* [Cluster-devel] [PATCH] GFS2: fallocate: do not rely on file_update_time to mark the inode dirty
@ 2015-09-22 10:10 Andrew Price
2015-09-22 12:44 ` Bob Peterson
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Price @ 2015-09-22 10:10 UTC (permalink / raw)
To: cluster-devel.redhat.com
Previously __gfs2_fallocate() relied on file_update_time() marking the
inode dirty, but that's not a safe assumption as that function doesn't
dirty the inode in some cases. Mark the inode dirty explicitly.
Signed-off-by: Andrew Price <anprice@redhat.com>
---
fs/gfs2/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index cf4ab89..71cd138 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -897,8 +897,8 @@ static long __gfs2_fallocate(struct file *file, int mode, loff_t offset, loff_t
if (!(mode & FALLOC_FL_KEEP_SIZE) && (pos + count) > inode->i_size) {
i_size_write(inode, pos + count);
- /* Marks the inode as dirty */
file_update_time(file);
+ mark_inode_dirty(inode);
}
return generic_write_sync(file, pos, count);
--
2.4.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Cluster-devel] [PATCH] GFS2: fallocate: do not rely on file_update_time to mark the inode dirty
2015-09-22 10:10 [Cluster-devel] [PATCH] GFS2: fallocate: do not rely on file_update_time to mark the inode dirty Andrew Price
@ 2015-09-22 12:44 ` Bob Peterson
0 siblings, 0 replies; 2+ messages in thread
From: Bob Peterson @ 2015-09-22 12:44 UTC (permalink / raw)
To: cluster-devel.redhat.com
----- Original Message -----
> Previously __gfs2_fallocate() relied on file_update_time() marking the
> inode dirty, but that's not a safe assumption as that function doesn't
> dirty the inode in some cases. Mark the inode dirty explicitly.
>
> Signed-off-by: Andrew Price <anprice@redhat.com>
> ---
> fs/gfs2/file.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
> index cf4ab89..71cd138 100644
> --- a/fs/gfs2/file.c
> +++ b/fs/gfs2/file.c
> @@ -897,8 +897,8 @@ static long __gfs2_fallocate(struct file *file, int mode,
> loff_t offset, loff_t
>
> if (!(mode & FALLOC_FL_KEEP_SIZE) && (pos + count) > inode->i_size) {
> i_size_write(inode, pos + count);
> - /* Marks the inode as dirty */
> file_update_time(file);
> + mark_inode_dirty(inode);
> }
>
> return generic_write_sync(file, pos, count);
> --
> 2.4.3
Hi,
Thanks. This is now applied to the for-next branch of the linux-gfs2 tree:
https://git.kernel.org/cgit/linux/kernel/git/gfs2/linux-gfs2.git/commit/fs/gfs2?h=for-next&id=4b813f09405823dcbb27a434f6ddcd1741e55e9b
Regards,
Bob Peterson
Red Hat File Systems
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-22 12:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-22 10:10 [Cluster-devel] [PATCH] GFS2: fallocate: do not rely on file_update_time to mark the inode dirty Andrew Price
2015-09-22 12:44 ` Bob Peterson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).