mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 04:34:08 +08:00
gfs2: fix timestamp handling on quota inodes
While these aren't generally visible from userland, it's best to be consistent with timestamp handling. When adjusting the quota, update the mtime and ctime like we would with a write operation on any other inode, and avoid updating the atime which should only be done for reads. Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com> Message-Id: <20230713135249.153796-1-jlayton@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
13bc244578
commit
d85f1b5bad
@ -871,7 +871,7 @@ static int gfs2_adjust_quota(struct gfs2_inode *ip, loff_t loc,
|
||||
size = loc + sizeof(struct gfs2_quota);
|
||||
if (size > inode->i_size)
|
||||
i_size_write(inode, size);
|
||||
inode->i_mtime = inode->i_atime = current_time(inode);
|
||||
inode->i_mtime = inode_set_ctime_current(inode);
|
||||
mark_inode_dirty(inode);
|
||||
set_bit(QDF_REFRESH, &qd->qd_flags);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user