summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlga Kornievskaia <okorniev@redhat.com>2026-04-02 19:12:36 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2026-04-13 14:43:28 -0700
commit4fa7ab8d292b1d4271fad397d98ea440e474cd7f (patch)
tree6a8293faeeed69356bb6298f1a0cd44412a3efb6
parent94545ffc0ae8ae6ab6590e9d7fed4da8123060cb (diff)
NFS: fix RENAME attr in presence of directory delegations
Since commit 6f9bda2337f8 ("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: 6f9bda2337f8 ("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>
-rw-r--r--fs/nfs/inode.c3
-rw-r--r--fs/nfs/nfs4proc.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 3a5bba7e3c92..43a0543364b8 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -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);
}
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 768de9935ff1..dd800403a7ce 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -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,