Browse Source

Merge branch 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block:
  [BLOCK] s390 xpram typo
  [BLOCK] Only include the compat ioctl code if CONFIG_BLOCK is set
  [BLOCK] Better fix for do_blk_trace_setup() for !CONFIG_BLOCK
  [BLOCK] Move sector_div() from blkdev.h to kernel.h
Linus Torvalds 17 years ago
parent
commit
7e6973e9ac
5 changed files with 20 additions and 21 deletions
  1. 4 0
      block/Kconfig
  2. 1 1
      block/Makefile
  3. 0 14
      include/linux/blkdev.h
  4. 1 6
      include/linux/blktrace_api.h
  5. 14 0
      include/linux/kernel.h

+ 4 - 0
block/Kconfig

@@ -62,6 +62,10 @@ config BLK_DEV_BSG
 	protocols (e.g. Task Management Functions and SMP in Serial
 	Attached SCSI).
 
+config BLOCK_COMPAT
+	bool
+	default y
+
 endif # BLOCK
 
 source block/Kconfig.iosched

+ 1 - 1
block/Makefile

@@ -11,4 +11,4 @@ obj-$(CONFIG_IOSCHED_DEADLINE)	+= deadline-iosched.o
 obj-$(CONFIG_IOSCHED_CFQ)	+= cfq-iosched.o
 
 obj-$(CONFIG_BLK_DEV_IO_TRACE)	+= blktrace.o
-obj-$(CONFIG_COMPAT)		+= compat_ioctl.o
+obj-$(CONFIG_BLOCK_COMPAT)	+= compat_ioctl.o

+ 0 - 14
include/linux/blkdev.h

@@ -20,20 +20,6 @@
 
 #include <asm/scatterlist.h>
 
-#ifdef CONFIG_LBD
-# include <asm/div64.h>
-# define sector_div(a, b) do_div(a, b)
-#else
-# define sector_div(n, b)( \
-{ \
-	int _res; \
-	_res = (n) % (b); \
-	(n) /= (b); \
-	_res; \
-} \
-)
-#endif
-
 struct scsi_ioctl_command;
 
 struct request_queue;

+ 1 - 6
include/linux/blktrace_api.h

@@ -290,12 +290,7 @@ static inline void blk_add_trace_remap(struct request_queue *q, struct bio *bio,
 #define blk_add_trace_generic(q, rq, rw, what)	do { } while (0)
 #define blk_add_trace_pdu_int(q, what, bio, pdu)	do { } while (0)
 #define blk_add_trace_remap(q, bio, dev, f, t)	do {} while (0)
-static inline int do_blk_trace_setup(struct request_queue *q,
-				     struct block_device *bdev,
-				     struct blk_user_trace_setup *buts)
-{
-	return 0;
-}
+#define do_blk_trace_setup(q, bdev, buts)	(-ENOTTY)
 #endif /* CONFIG_BLK_DEV_IO_TRACE */
 #endif /* __KERNEL__ */
 #endif

+ 14 - 0
include/linux/kernel.h

@@ -42,6 +42,20 @@ extern const char linux_proc_banner[];
 #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
 #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
 
+#ifdef CONFIG_LBD
+# include <asm/div64.h>
+# define sector_div(a, b) do_div(a, b)
+#else
+# define sector_div(n, b)( \
+{ \
+	int _res; \
+	_res = (n) % (b); \
+	(n) /= (b); \
+	_res; \
+} \
+)
+#endif
+
 /**
  * upper_32_bits - return bits 32-63 of a number
  * @n: the number we're accessing