Commit cf3fff54a46e1f8fa4cc1deb783172a392077eb0
1 parent
f518e35aec
Exists in
master
and in
4 other branches
NFS: Send valid mode bits to the server
inode->i_mode contains a lot more than just the mode bits. Make sure that we mask away this extra stuff in SETATTR calls to the server. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Showing 3 changed files with 5 additions and 2 deletions Side-by-side Diff
fs/nfs/nfs3xdr.c
fs/nfs/nfs4xdr.c
fs/nfs/proc.c
| ... | ... | @@ -111,6 +111,9 @@ |
| 111 | 111 | }; |
| 112 | 112 | int status; |
| 113 | 113 | |
| 114 | + /* Mask out the non-modebit related stuff from attr->ia_mode */ | |
| 115 | + sattr->ia_mode &= S_IALLUGO; | |
| 116 | + | |
| 114 | 117 | dprintk("NFS call setattr\n"); |
| 115 | 118 | nfs_fattr_init(fattr); |
| 116 | 119 | status = rpc_call(NFS_CLIENT(inode), NFSPROC_SETATTR, &arg, fattr, 0); |