]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/nfsd/vfs.c
fs: dcache scale dentry refcount
[mirror_ubuntu-bionic-kernel.git] / fs / nfsd / vfs.c
index 184938fcff04d5dff712b8bee01f5d7e41bb20ad..3a359023c9f7b2dc5a00efc862d834463d238018 100644 (file)
@@ -1756,8 +1756,7 @@ nfsd_rename(struct svc_rqst *rqstp, struct svc_fh *ffhp, char *fname, int flen,
                goto out_dput_new;
 
        if (svc_msnfs(ffhp) &&
-               ((atomic_read(&odentry->d_count) > 1)
-                || (atomic_read(&ndentry->d_count) > 1))) {
+               ((odentry->d_count > 1) || (ndentry->d_count > 1))) {
                        host_err = -EPERM;
                        goto out_dput_new;
        }
@@ -1843,7 +1842,7 @@ nfsd_unlink(struct svc_rqst *rqstp, struct svc_fh *fhp, int type,
        if (type != S_IFDIR) { /* It's UNLINK */
 #ifdef MSNFS
                if ((fhp->fh_export->ex_flags & NFSEXP_MSNFS) &&
-                       (atomic_read(&rdentry->d_count) > 1)) {
+                       (rdentry->d_count > 1)) {
                        host_err = -EPERM;
                } else
 #endif