diff options
| -rw-r--r-- | fs/nfsd/vfs.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 7dc98e14655d..fc24ee47eab5 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c | |||
| @@ -1786,12 +1786,12 @@ nfsd_unlink(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, | |||
| 1786 | rdentry = lookup_one_len(fname, dentry, flen); | 1786 | rdentry = lookup_one_len(fname, dentry, flen); |
| 1787 | host_err = PTR_ERR(rdentry); | 1787 | host_err = PTR_ERR(rdentry); |
| 1788 | if (IS_ERR(rdentry)) | 1788 | if (IS_ERR(rdentry)) |
| 1789 | goto out_nfserr; | 1789 | goto out_drop_write; |
| 1790 | 1790 | ||
| 1791 | if (d_really_is_negative(rdentry)) { | 1791 | if (d_really_is_negative(rdentry)) { |
| 1792 | dput(rdentry); | 1792 | dput(rdentry); |
| 1793 | err = nfserr_noent; | 1793 | host_err = -ENOENT; |
| 1794 | goto out; | 1794 | goto out_drop_write; |
| 1795 | } | 1795 | } |
| 1796 | 1796 | ||
| 1797 | if (!type) | 1797 | if (!type) |
| @@ -1805,6 +1805,8 @@ nfsd_unlink(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, | |||
| 1805 | host_err = commit_metadata(fhp); | 1805 | host_err = commit_metadata(fhp); |
| 1806 | dput(rdentry); | 1806 | dput(rdentry); |
| 1807 | 1807 | ||
| 1808 | out_drop_write: | ||
| 1809 | fh_drop_write(fhp); | ||
| 1808 | out_nfserr: | 1810 | out_nfserr: |
| 1809 | err = nfserrno(host_err); | 1811 | err = nfserrno(host_err); |
| 1810 | out: | 1812 | out: |
