lkml.org 
[lkml]   [2017]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Linux 4.10-rc7
On Mon, Feb 06, 2017 at 01:00:32AM -0500, Dave Jones wrote:
> This one smells funny to me.

Double mnt_want_write, no idea why lockdep isn't reporting that for me.
Fix below:

diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index ca13236dbb1f..a974368026a1 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -359,11 +359,6 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap,
err = fh_verify(rqstp, fhp, ftype, accmode);
if (err)
return err;
- if (get_write_count) {
- host_err = fh_want_write(fhp);
- if (host_err)
- goto out_host_err;
- }

dentry = fhp->fh_dentry;
inode = d_inode(dentry);
@@ -416,6 +411,12 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap,

iap->ia_valid |= ATTR_CTIME;

+ if (get_write_count) {
+ host_err = fh_want_write(fhp);
+ if (host_err)
+ goto out_host_err;
+ }
+
fh_lock(fhp);
host_err = notify_change(dentry, iap, NULL);
fh_unlock(fhp);
\
 
 \ /
  Last update: 2017-02-06 09:20    [W:0.081 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site