Commit 5e40b913 authored by Alexander Viro's avatar Alexander Viro Committed by James Bottomley

[PATCH] removed a bunch of gratuitous kdev_t uses

parent 71f73bd1
......@@ -212,8 +212,8 @@ encode_saved_post_attr(struct svc_rqst *rqstp, u32 *p, struct svc_fh *fhp)
p = xdr_encode_hyper(p, (u64) fhp->fh_post_size);
}
p = xdr_encode_hyper(p, ((u64)fhp->fh_post_blocks) << 9);
*p++ = htonl((u32) major(fhp->fh_post_rdev));
*p++ = htonl((u32) minor(fhp->fh_post_rdev));
*p++ = fhp->fh_post_rdev[0];
*p++ = fhp->fh_post_rdev[1];
if (rqstp->rq_reffh->fh_version == 1
&& rqstp->rq_reffh->fh_fsid_type == 1
&& (fhp->fh_export->ex_flags & NFSEXP_FSID))
......
......@@ -131,7 +131,6 @@ typedef int (merge_request_fn) (request_queue_t *, struct request *,
typedef int (merge_requests_fn) (request_queue_t *, struct request *,
struct request *);
typedef void (request_fn_proc) (request_queue_t *q);
typedef request_queue_t * (queue_proc) (kdev_t dev);
typedef int (make_request_fn) (request_queue_t *q, struct bio *bio);
typedef int (prep_rq_fn) (request_queue_t *, struct request *);
typedef void (unplug_fn) (void *q);
......
......@@ -127,21 +127,6 @@ struct knfsd_fh {
* The high 16 bits contain the rest (4 bits major
* and 12 bits minor),
*/
static inline __u32 kdev_t_to_u32(kdev_t dev)
{
unsigned int minor = minor(dev);
unsigned int major = major(dev);
__u32 udev;
/* Create the low 16 bits.. */
udev = ((major & 0xff) << 8) + (minor & 0xff);
/* ..and then the rest. */
major >>= 8; minor >>= 8;
udev |= (major << 28) | (minor << 16);
return udev;
}
static inline dev_t u32_to_dev_t(__u32 udev)
{
......@@ -191,7 +176,7 @@ typedef struct svc_fh {
__u64 fh_post_size; /* i_size */
unsigned long fh_post_blocks; /* i_blocks */
unsigned long fh_post_blksize;/* i_blksize */
kdev_t fh_post_rdev; /* i_rdev */
__u32 fh_post_rdev[2];/* i_rdev */
time_t fh_post_atime; /* i_atime */
time_t fh_post_mtime; /* i_mtime */
time_t fh_post_ctime; /* i_ctime */
......@@ -309,7 +294,8 @@ fill_post_wcc(struct svc_fh *fhp)
/* how much do we care for accuracy with MinixFS? */
fhp->fh_post_blocks = (inode->i_size+511) >> 9;
}
fhp->fh_post_rdev = inode->i_rdev;
fhp->fh_post_rdev[0] = htonl((u32)major(inode->i_rdev));
fhp->fh_post_rdev[1] = htonl((u32)minor(inode->i_rdev));
fhp->fh_post_atime = inode->i_atime;
fhp->fh_post_mtime = inode->i_mtime;
fhp->fh_post_ctime = inode->i_ctime;
......
......@@ -258,11 +258,6 @@ static inline int mdidx (mddev_t * mddev)
return mddev->__minor;
}
static inline kdev_t mddev_to_kdev(mddev_t * mddev)
{
return mk_kdev(MD_MAJOR, mdidx(mddev));
}
extern mdk_rdev_t * find_rdev_nr(mddev_t *mddev, int nr);
/*
......
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