This is a note to let you know that I've just added the patch titled

    nfsd: fix b0rken error value for setattr on read-only mount

to the 3.0-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     nfsd-fix-b0rken-error-value-for-setattr-on-read-only-mount.patch
and it can be found in the queue-3.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From [email protected]  Sun Apr 29 18:07:05 2012
From: Al Viro <[email protected]>
Date: Fri, 27 Apr 2012 17:42:43 -0500
Subject: nfsd: fix b0rken error value for setattr on read-only mount
To: Al Viro <[email protected]>
Message-ID: <20120427224243.GF2821@burratino>


From: Al Viro <[email protected]>

commit 96f6f98501196d46ce52c2697dd758d9300c63f5 upstream.

..._want_write() returns -EROFS on failure, _not_ an NFS error value.

Signed-off-by: Al Viro <[email protected]>
Signed-off-by: Jonathan Nieder <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 fs/nfsd/nfs4proc.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -812,6 +812,7 @@ nfsd4_setattr(struct svc_rqst *rqstp, st
              struct nfsd4_setattr *setattr)
 {
        __be32 status = nfs_ok;
+       int err;
 
        if (setattr->sa_iattr.ia_valid & ATTR_SIZE) {
                nfs4_lock_state();
@@ -823,9 +824,9 @@ nfsd4_setattr(struct svc_rqst *rqstp, st
                        return status;
                }
        }
-       status = mnt_want_write(cstate->current_fh.fh_export->ex_path.mnt);
-       if (status)
-               return status;
+       err = mnt_want_write(cstate->current_fh.fh_export->ex_path.mnt);
+       if (err)
+               return nfserrno(err);
        status = nfs_ok;
 
        status = check_attr_support(rqstp, cstate, setattr->sa_bmval,


Patches currently in stable-queue which might be from [email protected] 
are

queue-3.0/nfsd-fix-b0rken-error-value-for-setattr-on-read-only-mount.patch
queue-3.0/nfsd-fix-error-values-returned-by-nfsd4_lockt-when-nfsd_open-fails.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to