]> err.no Git - linux-2.6/commitdiff
knfsd: get rid of imode variable in nfsd_setattr
authorJeff Layton <jlayton@redhat.com>
Wed, 16 Apr 2008 20:28:46 +0000 (16:28 -0400)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Wed, 23 Apr 2008 20:13:43 +0000 (16:13 -0400)
...it's not really needed.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
fs/nfsd/vfs.c

index 832e2b86c541497a3b5f288233cfb7b217c8778a..1d0406c31a4438ce5a3ed811da38db3f28b3e1b3 100644 (file)
@@ -264,7 +264,6 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap,
        struct inode    *inode;
        int             accmode = MAY_SATTR;
        int             ftype = 0;
-       int             imode;
        __be32          err;
        int             host_err;
        int             size_change = 0;
@@ -360,10 +359,9 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap,
                DQUOT_INIT(inode);
        }
 
-       imode = inode->i_mode;
        if (iap->ia_valid & ATTR_MODE) {
                iap->ia_mode &= S_IALLUGO;
-               imode = iap->ia_mode |= (imode & ~S_IALLUGO);
+               iap->ia_mode |= (inode->i_mode & ~S_IALLUGO);
                /* if changing uid/gid revoke setuid/setgid in mode */
                if ((iap->ia_valid & ATTR_UID) && iap->ia_uid != inode->i_uid) {
                        iap->ia_valid |= ATTR_KILL_PRIV;