2014-02-18 15:34:22

by J. R. Okajima

[permalink] [raw]
Subject: [PATCH] NFSD, lost nfserrno() call in nfsd_setattr()


There is a regression in
208d0ac 2014-01-07 nfsd4: break only delegations when appropriate
which deletes an nfserrno() call in nfsd_setattr() (by accident,
probably), and NFSD becomes ignoring an error from VFS.

Here is a patch to fix it.

J. R. Okajima


diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index 017d3cb..6d7be3f 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -449,6 +449,7 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap,
fh_lock(fhp);
host_err = notify_change(dentry, iap, NULL);
fh_unlock(fhp);
+ err = nfserrno(host_err);

out_put_write_access:
if (size_change)


2014-02-18 20:44:40

by J. Bruce Fields

[permalink] [raw]
Subject: Re: [PATCH] NFSD, lost nfserrno() call in nfsd_setattr()

On Wed, Feb 19, 2014 at 12:27:53AM +0900, J. R. Okajima wrote:
>
> There is a regression in
> 208d0ac 2014-01-07 nfsd4: break only delegations when appropriate
> which deletes an nfserrno() call in nfsd_setattr() (by accident,
> probably), and NFSD becomes ignoring an error from VFS.
>
> Here is a patch to fix it.

Thanks for cathing that! Queueing up for 3.14.

--b.

>
> J. R. Okajima
>
>
> diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
> index 017d3cb..6d7be3f 100644
> --- a/fs/nfsd/vfs.c
> +++ b/fs/nfsd/vfs.c
> @@ -449,6 +449,7 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap,
> fh_lock(fhp);
> host_err = notify_change(dentry, iap, NULL);
> fh_unlock(fhp);
> + err = nfserrno(host_err);
>
> out_put_write_access:
> if (size_change)