diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-03-11 14:10:26 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-03-11 14:10:26 -0400 |
commit | bca794785c2c12ecddeb09e70165b8ff80baa6ae (patch) | |
tree | 8e8fefa535c799240846082ba580dc87d0a98cbf /fs/nfs/nfs2xdr.c | |
parent | 1ca277d88dafdbc3c5a69d32590e7184b9af6371 (diff) |
NFS: Fix the type of struct nfs_fattr->mode
There is no point in using anything other than umode_t, since we copy the
content pretty much directly into inode->i_mode.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs2xdr.c')
-rw-r--r-- | fs/nfs/nfs2xdr.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/nfs/nfs2xdr.c b/fs/nfs/nfs2xdr.c index bea99992c302..c862c9340f9a 100644 --- a/fs/nfs/nfs2xdr.c +++ b/fs/nfs/nfs2xdr.c | |||
@@ -120,8 +120,8 @@ xdr_decode_time(__be32 *p, struct timespec *timep) | |||
120 | static __be32 * | 120 | static __be32 * |
121 | xdr_decode_fattr(__be32 *p, struct nfs_fattr *fattr) | 121 | xdr_decode_fattr(__be32 *p, struct nfs_fattr *fattr) |
122 | { | 122 | { |
123 | u32 rdev; | 123 | u32 rdev, type; |
124 | fattr->type = (enum nfs_ftype) ntohl(*p++); | 124 | type = ntohl(*p++); |
125 | fattr->mode = ntohl(*p++); | 125 | fattr->mode = ntohl(*p++); |
126 | fattr->nlink = ntohl(*p++); | 126 | fattr->nlink = ntohl(*p++); |
127 | fattr->uid = ntohl(*p++); | 127 | fattr->uid = ntohl(*p++); |
@@ -138,8 +138,7 @@ xdr_decode_fattr(__be32 *p, struct nfs_fattr *fattr) | |||
138 | p = xdr_decode_time(p, &fattr->ctime); | 138 | p = xdr_decode_time(p, &fattr->ctime); |
139 | fattr->valid |= NFS_ATTR_FATTR_V2; | 139 | fattr->valid |= NFS_ATTR_FATTR_V2; |
140 | fattr->rdev = new_decode_dev(rdev); | 140 | fattr->rdev = new_decode_dev(rdev); |
141 | if (fattr->type == NFCHR && rdev == NFS2_FIFO_DEV) { | 141 | if (type == NFCHR && rdev == NFS2_FIFO_DEV) { |
142 | fattr->type = NFFIFO; | ||
143 | fattr->mode = (fattr->mode & ~S_IFMT) | S_IFIFO; | 142 | fattr->mode = (fattr->mode & ~S_IFMT) | S_IFIFO; |
144 | fattr->rdev = 0; | 143 | fattr->rdev = 0; |
145 | } | 144 | } |