Merge tag 'riscv/for-v5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv...
[linux-2.6-microblaze.git] / fs / nfsd / vfs.h
index a7e1073..db35124 100644 (file)
@@ -120,8 +120,11 @@ void               nfsd_put_raparams(struct file *file, struct raparms *ra);
 
 static inline int fh_want_write(struct svc_fh *fh)
 {
-       int ret = mnt_want_write(fh->fh_export->ex_path.mnt);
+       int ret;
 
+       if (fh->fh_want_write)
+               return 0;
+       ret = mnt_want_write(fh->fh_export->ex_path.mnt);
        if (!ret)
                fh->fh_want_write = true;
        return ret;