Message ID | 20250124151553.17824-2-cel@kernel.org (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Chuck Lever |
Headers | show |
Series | Avoid returning NFS4ERR_FILE_OPEN when not appropriate | expand |
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 29cb7b812d71..2d8e27c225f9 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -2011,11 +2011,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;