diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-01 13:58:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-01 13:58:42 -0400 |
commit | 4fe70410d9a219dabb47328effccae7e7f2a6e26 (patch) | |
tree | 7f36d6cd27333fa28447f06ce37a6fecceb42955 /fs/nfs/nfs2xdr.c | |
parent | 395d73413c5656c6d7706ae91dcb441f9b7e3074 (diff) | |
parent | cc85906110e26fe8537c3bdbc08a74ae8110030b (diff) |
Merge branch 'for-linus' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* 'for-linus' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: (58 commits)
SUNRPC: Ensure IPV6_V6ONLY is set on the socket before binding to a port
NSM: Fix unaligned accesses in nsm_init_private()
NFS: Simplify logic to compare socket addresses in client.c
NFS: Start PF_INET6 callback listener only if IPv6 support is available
lockd: Start PF_INET6 listener only if IPv6 support is available
SUNRPC: Remove CONFIG_SUNRPC_REGISTER_V4
SUNRPC: rpcb_register() should handle errors silently
SUNRPC: Simplify kernel RPC service registration
SUNRPC: Simplify svc_unregister()
SUNRPC: Allow callers to pass rpcb_v4_register a NULL address
SUNRPC: rpcbind actually interprets r_owner string
SUNRPC: Clean up address type casts in rpcb_v4_register()
SUNRPC: Don't return EPROTONOSUPPORT in svc_register()'s helpers
SUNRPC: Use IPv4 loopback for registering AF_INET6 kernel RPC services
SUNRPC: Set IPV6ONLY flag on PF_INET6 RPC listener sockets
NFS: Revert creation of IPv6 listeners for lockd and NFSv4 callbacks
SUNRPC: Remove @family argument from svc_create() and svc_create_pooled()
SUNRPC: Change svc_create_xprt() to take a @family argument
SUNRPC: svc_setup_socket() gets protocol family from socket
SUNRPC: Pass a family argument to svc_register()
...
Diffstat (limited to 'fs/nfs/nfs2xdr.c')
-rw-r--r-- | fs/nfs/nfs2xdr.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/nfs/nfs2xdr.c b/fs/nfs/nfs2xdr.c index 28bab67d1519..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++); |
@@ -136,10 +136,9 @@ xdr_decode_fattr(__be32 *p, struct nfs_fattr *fattr) | |||
136 | p = xdr_decode_time(p, &fattr->atime); | 136 | p = xdr_decode_time(p, &fattr->atime); |
137 | p = xdr_decode_time(p, &fattr->mtime); | 137 | p = xdr_decode_time(p, &fattr->mtime); |
138 | p = xdr_decode_time(p, &fattr->ctime); | 138 | p = xdr_decode_time(p, &fattr->ctime); |
139 | fattr->valid |= NFS_ATTR_FATTR; | 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 | } |