Skip to content

Commit

Permalink
knfsd: get rid of imode variable in nfsd_setattr
Browse files Browse the repository at this point in the history
...it's not really needed.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
  • Loading branch information
Jeff Layton authored and J. Bruce Fields committed Apr 23, 2008
1 parent 0dc220f commit dee3209
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fs/nfsd/vfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit dee3209

Please sign in to comment.