mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 08:33:17 +02:00
NFSD: nfsd_unlink() clobbers non-zero status returned from fh_fill_pre_attrs()
If fh_fill_pre_attrs() returns a non-zero status, the error flow
takes it through out_unlock, which then overwrites the returned
status code with
err = nfserrno(host_err);
Fixes: a332018a91 ("nfsd: handle failure to collect pre/post-op attrs more sanely")
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
parent
904201c7b5
commit
d7d8e3169b
|
|
@ -2010,11 +2010,9 @@ nfsd_unlink(struct svc_rqst *rqstp, struct svc_fh *fhp, int type,
|
|||
* error status.
|
||||
*/
|
||||
err = nfserr_file_open;
|
||||
} else {
|
||||
err = nfserrno(host_err);
|
||||
}
|
||||
out:
|
||||
return err;
|
||||
return err != nfs_ok ? err : nfserrno(host_err);
|
||||
out_unlock:
|
||||
inode_unlock(dirp);
|
||||
goto out_drop_write;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user