mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-08 18:57:22 +00:00
vfs: add ATTR_CTIME_SET flag
[ Upstream commitafc5b36e29] When ATTR_ATIME_SET and ATTR_MTIME_SET are set in the ia_valid mask, the notify_change() logic takes that to mean that the request should set those values explicitly, and not override them with "now". With the advent of delegated timestamps, similar functionality is needed for the ctime. Add a ATTR_CTIME_SET flag, and use that to indicate that the ctime should be accepted as-is. Also, clean up the if statements to eliminate the extra negatives. In setattr_copy() and setattr_copy_mgtime() use inode_set_ctime_deleg() when ATTR_CTIME_SET is set, instead of basing the decision on ATTR_DELEG. Signed-off-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Stable-dep-of:c066ff58e5("nfsd: use ATTR_CTIME_SET for delegated ctime updates") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
910c7cdc8d
commit
0e2c499a45
2 changed files with 20 additions and 25 deletions
Loading…
Add table
Add a link
Reference in a new issue