diff options
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/vfs.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 184938fcff04..3a359023c9f7 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c | |||
@@ -1756,8 +1756,7 @@ nfsd_rename(struct svc_rqst *rqstp, struct svc_fh *ffhp, char *fname, int flen, | |||
1756 | goto out_dput_new; | 1756 | goto out_dput_new; |
1757 | 1757 | ||
1758 | if (svc_msnfs(ffhp) && | 1758 | if (svc_msnfs(ffhp) && |
1759 | ((atomic_read(&odentry->d_count) > 1) | 1759 | ((odentry->d_count > 1) || (ndentry->d_count > 1))) { |
1760 | || (atomic_read(&ndentry->d_count) > 1))) { | ||
1761 | host_err = -EPERM; | 1760 | host_err = -EPERM; |
1762 | goto out_dput_new; | 1761 | goto out_dput_new; |
1763 | } | 1762 | } |
@@ -1843,7 +1842,7 @@ nfsd_unlink(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, | |||
1843 | if (type != S_IFDIR) { /* It's UNLINK */ | 1842 | if (type != S_IFDIR) { /* It's UNLINK */ |
1844 | #ifdef MSNFS | 1843 | #ifdef MSNFS |
1845 | if ((fhp->fh_export->ex_flags & NFSEXP_MSNFS) && | 1844 | if ((fhp->fh_export->ex_flags & NFSEXP_MSNFS) && |
1846 | (atomic_read(&rdentry->d_count) > 1)) { | 1845 | (rdentry->d_count > 1)) { |
1847 | host_err = -EPERM; | 1846 | host_err = -EPERM; |
1848 | } else | 1847 | } else |
1849 | #endif | 1848 | #endif |