diff options
author | Jeff Layton <jlayton@kernel.org> | 2024-11-11 19:01:13 +0300 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2024-11-11 21:42:06 +0300 |
commit | f67eef8da0e8c54709fefdecd16ad8d70f0c9d20 (patch) | |
tree | 21d3b53512b66c6627c2183ae3042478509ca10d /fs/nfsd/nfs4xdr.c | |
parent | ac159338d53b8846b020be8260884e8234572a70 (diff) | |
download | linux-f67eef8da0e8c54709fefdecd16ad8d70f0c9d20.tar.xz |
nfsd: drop inode parameter from nfsd4_change_attribute()
The inode that nfs4_open_delegation() passes to this function is
wrong, which throws off the result. The inode will end up getting a
directory-style change attr instead of a regular-file-style one.
Fix up nfs4_delegation_stat() to fetch STATX_MODE, and then drop the
inode parameter from nfsd4_change_attribute(), since it's no longer
needed.
Fixes: c5967721e106 ("NFSD: handle GETATTR conflict with write delegation")
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/nfs4xdr.c')
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index f118921250c3..8d25aef51ad1 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -3040,7 +3040,7 @@ static __be32 nfsd4_encode_fattr4_change(struct xdr_stream *xdr, return nfs_ok; } - c = nfsd4_change_attribute(&args->stat, d_inode(args->dentry)); + c = nfsd4_change_attribute(&args->stat); return nfsd4_encode_changeid4(xdr, c); } |