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)
static u32 *
xdr_decode_fattr(u32 *p, struct nfs_fattr *fattr)
{
u32 rdev;
fattr->type = (enum nfs_ftype) ntohl(*p++);
fattr->mode = ntohl(*p++);
fattr->nlink = ntohl(*p++);
......@@ -113,7 +114,7 @@ xdr_decode_fattr(u32 *p, struct nfs_fattr *fattr)
fattr->gid = ntohl(*p++);
fattr->size = ntohl(*p++);
fattr->du.nfs2.blocksize = ntohl(*p++);
fattr->rdev = ntohl(*p++);
rdev = ntohl(*p++);
fattr->du.nfs2.blocks = ntohl(*p++);
fattr->fsid_u.nfs3 = ntohl(*p++);
fattr->fileid = ntohl(*p++);
......@@ -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->ctime);
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->mode = (fattr->mode & ~S_IFMT) | S_IFIFO;
fattr->rdev = 0;
......
......@@ -23,7 +23,7 @@ struct nfs_fattr {
__u64 used;
} nfs3;
} du;
__u32 rdev;
dev_t rdev;
union {
__u64 nfs3; /* also nfs2 */
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