Эх сурвалжийг харах

GFS2: Update timestamps on fallocate

gfs2_fallocate() wasn't updating ctime and mtime when modifying the
inode. Add a call to file_update_time() to do that.

Signed-off-by: Andrew Price <anprice@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Andrew Price 10 жил өмнө
parent
commit
98f1a696a1
1 өөрчлөгдсөн 2 нэмэгдсэн , 1 устгасан
  1. 2 1
      fs/gfs2/file.c

+ 2 - 1
fs/gfs2/file.c

@@ -874,7 +874,8 @@ retry:
 
 
 	if (!(mode & FALLOC_FL_KEEP_SIZE) && (pos + count) > inode->i_size) {
 	if (!(mode & FALLOC_FL_KEEP_SIZE) && (pos + count) > inode->i_size) {
 		i_size_write(inode, pos + count);
 		i_size_write(inode, pos + count);
-		mark_inode_dirty(inode);
+		/* Marks the inode as dirty */
+		file_update_time(file);
 	}
 	}
 
 
 	return generic_write_sync(file, pos, count);
 	return generic_write_sync(file, pos, count);