]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] removed a bunch of gratuitous kdev_t uses
authorAlexander Viro <viro@math.psu.edu>
Mon, 28 Oct 2002 10:50:44 +0000 (02:50 -0800)
committerJames Bottomley <jejb@mulgrave.(none)>
Mon, 28 Oct 2002 10:50:44 +0000 (02:50 -0800)
fs/nfsd/nfs3xdr.c
include/linux/blkdev.h
include/linux/nfsd/nfsfh.h
include/linux/raid/md_k.h

index 491f4f1b73d0a4fc32fea96660afce1a39c73f4e..1cfe66a163ee18be2a0e9d64e6c6c03079f8ceb3 100644 (file)
@@ -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))
index 5aa09c66484f24c7651fb81f422adeca19b6a30d..62cd5652cf8cde0fa9e9474aac8bc3fd0b218e32 100644 (file)
@@ -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);
index 07a84be0f6b38e33de6b800d306d3f64d50011ac..1617f5977b8aa0b19ec09aa9ae2d91bc15b314c1 100644 (file)
@@ -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;
index b088c30951bde3f449592c8ce8645f31b771f26a..453324c18bddd0f7674d7759704bc2d2991586dc 100644 (file)
@@ -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);
 
 /*