Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4b813f09 authored by Andrew Price's avatar Andrew Price Committed by Bob Peterson
Browse files

GFS2: fallocate: do not rely on file_update_time to mark the inode dirty



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: default avatarAndrew Price <anprice@redhat.com>
Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
parent 6ff33f39
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);