mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-17 16:36:45 -04:00
NFS: fix RENAME attr in presence of directory delegations
Since commit6f9bda2337("NFS: Fix directory delegation verifier checks") xfstest generic/309 is failing because after the rename (mv) operation, client's mtime/ctime is the same. Update the delegated mtime when directory delegations are present in rename. Fixes:6f9bda2337("NFS: Fix directory delegation verifier checks") Signed-off-by: Olga Kornievskaia <okorniev@redhat.com> Reviewed-by: Benjamin Coddington <bcodding@hammerspace.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
committed by
Trond Myklebust
parent
94545ffc0a
commit
4fa7ab8d29
@@ -692,7 +692,8 @@ void nfs_update_delegated_atime(struct inode *inode)
|
||||
|
||||
void nfs_update_delegated_mtime_locked(struct inode *inode)
|
||||
{
|
||||
if (nfs_have_delegated_mtime(inode))
|
||||
if (nfs_have_delegated_mtime(inode) ||
|
||||
nfs_have_directory_delegation(inode))
|
||||
nfs_update_mtime(inode);
|
||||
}
|
||||
|
||||
|
||||
@@ -5052,6 +5052,7 @@ static int nfs4_proc_rename_done(struct rpc_task *task, struct inode *old_dir,
|
||||
res->new_fattr->time_start,
|
||||
NFS_INO_INVALID_NLINK |
|
||||
NFS_INO_INVALID_DATA);
|
||||
nfs_update_delegated_mtime(new_dir);
|
||||
} else
|
||||
nfs4_update_changeattr(old_dir, &res->old_cinfo,
|
||||
res->old_fattr->time_start,
|
||||
|
||||
Reference in New Issue
Block a user