]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging/lustre: lloop depends on BLOCK
authorXiong Zhou <jencce.kernel@gmail.com>
Fri, 2 Aug 2013 05:50:48 +0000 (13:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Aug 2013 07:30:46 +0000 (15:30 +0800)
Add a config option for llite/lloop in lustre driver, making it depends
on BLOCK to fix this better:
drivers/staging/lustre/lustre/fid/../include/linux/lustre_compat25.h:117:2:
error: implicit declaration of function â€˜unregister_blkdev'

Also, remove the wrapper ll_unregister_blkdev which depends on BLOCK in
the header and just call unregister_blkdev in lloop.c based on Peng Tao's
comment. Drop the redundant dependency on STAGING for LUSTRE_FS, remove
some unnecessary jdb header files which depends on BLOCK btw.

Signed-off-by: Xiong Zhou <jencce.kernel@gmail.com>
Reviewed-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/Kconfig
drivers/staging/lustre/lustre/fld/fld_cache.c
drivers/staging/lustre/lustre/fld/fld_request.c
drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
drivers/staging/lustre/lustre/llite/Makefile
drivers/staging/lustre/lustre/llite/lloop.c
drivers/staging/lustre/lustre/lvfs/fsfilt.c

index 0b45de0726f65cfbd67c602e10a42c4f27f6b212..4e898e4918605bf058554d6cae15b6a5e31e550a 100644 (file)
@@ -1,6 +1,6 @@
 config LUSTRE_FS
        tristate "Lustre file system client support"
-       depends on STAGING && INET && BLOCK && m
+       depends on INET && m
        select LNET
        select CRYPTO
        select CRYPTO_CRC32
@@ -53,3 +53,8 @@ config LUSTRE_TRANSLATE_ERRNOS
        bool
        depends on LUSTRE_FS && !X86
        default true
+
+config LUSTRE_LLITE_LLOOP
+       bool "Lustre virtual block device"
+       depends on LUSTRE_FS && BLOCK
+       default m
index 347f2ae83bc8c5e8b9197ca9134108f84b65081b..84101076a65602aa91b3ff8a6ef8146d7c24a783 100644 (file)
@@ -45,7 +45,6 @@
 
 # include <linux/libcfs/libcfs.h>
 # include <linux/module.h>
-# include <linux/jbd.h>
 # include <asm/div64.h>
 
 #include <obd.h>
index c99b945cc8ef16144463d1e134320592e1281d9f..049322a791402e2db9e2057d33bf7c680d5a5bbc 100644 (file)
@@ -44,7 +44,6 @@
 
 # include <linux/libcfs/libcfs.h>
 # include <linux/module.h>
-# include <linux/jbd.h>
 # include <asm/div64.h>
 
 #include <obd.h>
index 426533b5d1352bb0bf6a19858ec4a8877d8a0609..018e604490b787da9b5353ebe666e373f2c26ecb 100644 (file)
@@ -111,13 +111,6 @@ static inline void ll_set_fs_pwd(struct fs_struct *fs, struct vfsmount *mnt,
 #define TREE_READ_LOCK_IRQ(mapping)    spin_lock_irq(&(mapping)->tree_lock)
 #define TREE_READ_UNLOCK_IRQ(mapping)  spin_unlock_irq(&(mapping)->tree_lock)
 
-static inline
-int ll_unregister_blkdev(unsigned int dev, const char *name)
-{
-       unregister_blkdev(dev, name);
-       return 0;
-}
-
 #define ll_invalidate_bdev(a,b)         invalidate_bdev((a))
 
 #ifndef FS_HAS_FIEMAP
index dff0c0486e778ee3c2f8c3103961a8fe1bf2a163..f493e0740004aef4aa75534218768e0a8467d4d1 100644 (file)
@@ -1,5 +1,5 @@
 obj-$(CONFIG_LUSTRE_FS) += lustre.o
-obj-$(CONFIG_LUSTRE_FS) += llite_lloop.o
+obj-$(CONFIG_LUSTRE_LLITE_LLOOP) += llite_lloop.o
 lustre-y := dcache.o dir.o file.o llite_close.o llite_lib.o llite_nfs.o \
            rw.o lproc_llite.o namei.o symlink.o llite_mmap.o \
            xattr.o remote_perm.o llite_rmtacl.o llite_capa.o \
index e063efc23af91a1ce70a739ad0b8fd5a1ec2e8cd..ae3dc9d5b484c3cd75e38d996e53b0348307a18e 100644 (file)
@@ -848,10 +848,8 @@ static void lloop_exit(void)
                blk_cleanup_queue(loop_dev[i].lo_queue);
                put_disk(disks[i]);
        }
-       if (ll_unregister_blkdev(lloop_major, "lloop"))
-               CWARN("lloop: cannot unregister blkdev\n");
-       else
-               CDEBUG(D_CONFIG, "unregistered lloop major %d\n", lloop_major);
+
+       unregister_blkdev(lloop_major, "lloop");
 
        OBD_FREE(disks, max_loop * sizeof(*disks));
        OBD_FREE(loop_dev, max_loop * sizeof(*loop_dev));
index 064445cbdb5727b2e9770262a17a05e1ef55631f..ce71f805c6de8eb4a12ef76c5632a7f8bf2bcdba 100644 (file)
@@ -35,7 +35,6 @@
 #define DEBUG_SUBSYSTEM S_FILTER
 
 #include <linux/fs.h>
-#include <linux/jbd.h>
 #include <linux/module.h>
 #include <linux/kmod.h>
 #include <linux/slab.h>