aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfsd/vfs.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfsd/vfs.h b/fs/nfsd/vfs.h
index a7e107309f76..db351247892d 100644
--- a/fs/nfsd/vfs.h
+++ b/fs/nfsd/vfs.h
@@ -120,8 +120,11 @@ void nfsd_put_raparams(struct file *file, struct raparms *ra);
120 120
121static inline int fh_want_write(struct svc_fh *fh) 121static inline int fh_want_write(struct svc_fh *fh)
122{ 122{
123 int ret = mnt_want_write(fh->fh_export->ex_path.mnt); 123 int ret;
124 124
125 if (fh->fh_want_write)
126 return 0;
127 ret = mnt_want_write(fh->fh_export->ex_path.mnt);
125 if (!ret) 128 if (!ret)
126 fh->fh_want_write = true; 129 fh->fh_want_write = true;
127 return ret; 130 return ret;