Commit 0dbd0f68 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] large dev_t - second series (14/15)

	nfs_fattr->rdev switched to dev_t; code that unpacks on-the-wire
attributes does explicit conversion now.
parent 81eec8eb
...@@ -106,6 +106,7 @@ xdr_decode_time(u32 *p, struct timespec *timep) ...@@ -106,6 +106,7 @@ xdr_decode_time(u32 *p, struct timespec *timep)
static u32 * static u32 *
xdr_decode_fattr(u32 *p, struct nfs_fattr *fattr) xdr_decode_fattr(u32 *p, struct nfs_fattr *fattr)
{ {
u32 rdev;
fattr->type = (enum nfs_ftype) ntohl(*p++); fattr->type = (enum nfs_ftype) ntohl(*p++);
fattr->mode = ntohl(*p++); fattr->mode = ntohl(*p++);
fattr->nlink = ntohl(*p++); fattr->nlink = ntohl(*p++);
...@@ -113,7 +114,7 @@ xdr_decode_fattr(u32 *p, struct nfs_fattr *fattr) ...@@ -113,7 +114,7 @@ xdr_decode_fattr(u32 *p, struct nfs_fattr *fattr)
fattr->gid = ntohl(*p++); fattr->gid = ntohl(*p++);
fattr->size = ntohl(*p++); fattr->size = ntohl(*p++);
fattr->du.nfs2.blocksize = ntohl(*p++); fattr->du.nfs2.blocksize = ntohl(*p++);
fattr->rdev = ntohl(*p++); rdev = ntohl(*p++);
fattr->du.nfs2.blocks = ntohl(*p++); fattr->du.nfs2.blocks = ntohl(*p++);
fattr->fsid_u.nfs3 = ntohl(*p++); fattr->fsid_u.nfs3 = ntohl(*p++);
fattr->fileid = ntohl(*p++); fattr->fileid = ntohl(*p++);
...@@ -121,7 +122,8 @@ xdr_decode_fattr(u32 *p, struct nfs_fattr *fattr) ...@@ -121,7 +122,8 @@ xdr_decode_fattr(u32 *p, struct nfs_fattr *fattr)
p = xdr_decode_time(p, &fattr->mtime); p = xdr_decode_time(p, &fattr->mtime);
p = xdr_decode_time(p, &fattr->ctime); p = xdr_decode_time(p, &fattr->ctime);
fattr->valid |= NFS_ATTR_FATTR; fattr->valid |= NFS_ATTR_FATTR;
if (fattr->type == NFCHR && fattr->rdev == NFS2_FIFO_DEV) { fattr->rdev = old_decode_dev(rdev);
if (fattr->type == NFCHR && rdev == NFS2_FIFO_DEV) {
fattr->type = NFFIFO; fattr->type = NFFIFO;
fattr->mode = (fattr->mode & ~S_IFMT) | S_IFIFO; fattr->mode = (fattr->mode & ~S_IFMT) | S_IFIFO;
fattr->rdev = 0; fattr->rdev = 0;
......
...@@ -23,7 +23,7 @@ struct nfs_fattr { ...@@ -23,7 +23,7 @@ struct nfs_fattr {
__u64 used; __u64 used;
} nfs3; } nfs3;
} du; } du;
__u32 rdev; dev_t rdev;
union { union {
__u64 nfs3; /* also nfs2 */ __u64 nfs3; /* also nfs2 */
struct { struct {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment