aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/vfs.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2008-04-16 16:28:46 -0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2008-04-23 16:13:43 -0400
commitdee3209d993f17081d2c58d6470dfc8d6662078b (patch)
treed19b417851b970c659612593a1f9b6df942e313e /fs/nfsd/vfs.c
parent0dc220f0815497858db539d27947f3ec83202ace (diff)
knfsd: get rid of imode variable in nfsd_setattr
...it's not really needed. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/nfsd/vfs.c')
-rw-r--r--fs/nfsd/vfs.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index 832e2b86c541..1d0406c31a44 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -264,7 +264,6 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap,
264 struct inode *inode; 264 struct inode *inode;
265 int accmode = MAY_SATTR; 265 int accmode = MAY_SATTR;
266 int ftype = 0; 266 int ftype = 0;
267 int imode;
268 __be32 err; 267 __be32 err;
269 int host_err; 268 int host_err;
270 int size_change = 0; 269 int size_change = 0;
@@ -360,10 +359,9 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap,
360 DQUOT_INIT(inode); 359 DQUOT_INIT(inode);
361 } 360 }
362 361
363 imode = inode->i_mode;
364 if (iap->ia_valid & ATTR_MODE) { 362 if (iap->ia_valid & ATTR_MODE) {
365 iap->ia_mode &= S_IALLUGO; 363 iap->ia_mode &= S_IALLUGO;
366 imode = iap->ia_mode |= (imode & ~S_IALLUGO); 364 iap->ia_mode |= (inode->i_mode & ~S_IALLUGO);
367 /* if changing uid/gid revoke setuid/setgid in mode */ 365 /* if changing uid/gid revoke setuid/setgid in mode */
368 if ((iap->ia_valid & ATTR_UID) && iap->ia_uid != inode->i_uid) { 366 if ((iap->ia_valid & ATTR_UID) && iap->ia_uid != inode->i_uid) {
369 iap->ia_valid |= ATTR_KILL_PRIV; 367 iap->ia_valid |= ATTR_KILL_PRIV;