move linux/loop.h to drivers/block
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 12 May 2013 14:14:07 +0000 (10:14 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 29 Jun 2013 08:46:45 +0000 (12:46 +0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/block/cryptoloop.c
drivers/block/loop.c
drivers/block/loop.h [new file with mode: 0644]
include/linux/loop.h [deleted file]

index 8b6bb764b0a3f83edb759fdb2ac80559c3dfb511..99e773cb70d0b58d4a54115be3593986966def0f 100644 (file)
@@ -25,9 +25,9 @@
 #include <linux/string.h>
 #include <linux/crypto.h>
 #include <linux/blkdev.h>
-#include <linux/loop.h>
 #include <linux/scatterlist.h>
 #include <asm/uaccess.h>
+#include "loop.h"
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("loop blockdevice transferfunction adaptor / CryptoAPI");
index d92d50fd84b7d4ec59d5537eed5d9fd288005c51..40e715531aa65f0e63babd13757ad6dfb104d22a 100644 (file)
@@ -63,7 +63,6 @@
 #include <linux/init.h>
 #include <linux/swap.h>
 #include <linux/slab.h>
-#include <linux/loop.h>
 #include <linux/compat.h>
 #include <linux/suspend.h>
 #include <linux/freezer.h>
@@ -76,6 +75,7 @@
 #include <linux/sysfs.h>
 #include <linux/miscdevice.h>
 #include <linux/falloc.h>
+#include "loop.h"
 
 #include <asm/uaccess.h>
 
diff --git a/drivers/block/loop.h b/drivers/block/loop.h
new file mode 100644 (file)
index 0000000..90df5d6
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * loop.h
+ *
+ * Written by Theodore Ts'o, 3/29/93.
+ *
+ * Copyright 1993 by Theodore Ts'o.  Redistribution of this file is
+ * permitted under the GNU General Public License.
+ */
+#ifndef _LINUX_LOOP_H
+#define _LINUX_LOOP_H
+
+#include <linux/bio.h>
+#include <linux/blkdev.h>
+#include <linux/spinlock.h>
+#include <linux/mutex.h>
+#include <uapi/linux/loop.h>
+
+/* Possible states of device */
+enum {
+       Lo_unbound,
+       Lo_bound,
+       Lo_rundown,
+};
+
+struct loop_func_table;
+
+struct loop_device {
+       int             lo_number;
+       int             lo_refcnt;
+       loff_t          lo_offset;
+       loff_t          lo_sizelimit;
+       int             lo_flags;
+       int             (*transfer)(struct loop_device *, int cmd,
+                                   struct page *raw_page, unsigned raw_off,
+                                   struct page *loop_page, unsigned loop_off,
+                                   int size, sector_t real_block);
+       char            lo_file_name[LO_NAME_SIZE];
+       char            lo_crypt_name[LO_NAME_SIZE];
+       char            lo_encrypt_key[LO_KEY_SIZE];
+       int             lo_encrypt_key_size;
+       struct loop_func_table *lo_encryption;
+       __u32           lo_init[2];
+       kuid_t          lo_key_owner;   /* Who set the key */
+       int             (*ioctl)(struct loop_device *, int cmd, 
+                                unsigned long arg); 
+
+       struct file *   lo_backing_file;
+       struct block_device *lo_device;
+       unsigned        lo_blocksize;
+       void            *key_data; 
+
+       gfp_t           old_gfp_mask;
+
+       spinlock_t              lo_lock;
+       struct bio_list         lo_bio_list;
+       unsigned int            lo_bio_count;
+       int                     lo_state;
+       struct mutex            lo_ctl_mutex;
+       struct task_struct      *lo_thread;
+       wait_queue_head_t       lo_event;
+       /* wait queue for incoming requests */
+       wait_queue_head_t       lo_req_wait;
+
+       struct request_queue    *lo_queue;
+       struct gendisk          *lo_disk;
+};
+
+/* Support for loadable transfer modules */
+struct loop_func_table {
+       int number;     /* filter type */ 
+       int (*transfer)(struct loop_device *lo, int cmd,
+                       struct page *raw_page, unsigned raw_off,
+                       struct page *loop_page, unsigned loop_off,
+                       int size, sector_t real_block);
+       int (*init)(struct loop_device *, const struct loop_info64 *); 
+       /* release is called from loop_unregister_transfer or clr_fd */
+       int (*release)(struct loop_device *); 
+       int (*ioctl)(struct loop_device *, int cmd, unsigned long arg);
+       struct module *owner;
+}; 
+
+int loop_register_transfer(struct loop_func_table *funcs);
+int loop_unregister_transfer(int number); 
+
+#endif
diff --git a/include/linux/loop.h b/include/linux/loop.h
deleted file mode 100644 (file)
index 460b60f..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * include/linux/loop.h
- *
- * Written by Theodore Ts'o, 3/29/93.
- *
- * Copyright 1993 by Theodore Ts'o.  Redistribution of this file is
- * permitted under the GNU General Public License.
- */
-#ifndef _LINUX_LOOP_H
-#define _LINUX_LOOP_H
-
-#include <linux/bio.h>
-#include <linux/blkdev.h>
-#include <linux/spinlock.h>
-#include <linux/mutex.h>
-#include <uapi/linux/loop.h>
-
-/* Possible states of device */
-enum {
-       Lo_unbound,
-       Lo_bound,
-       Lo_rundown,
-};
-
-struct loop_func_table;
-
-struct loop_device {
-       int             lo_number;
-       int             lo_refcnt;
-       loff_t          lo_offset;
-       loff_t          lo_sizelimit;
-       int             lo_flags;
-       int             (*transfer)(struct loop_device *, int cmd,
-                                   struct page *raw_page, unsigned raw_off,
-                                   struct page *loop_page, unsigned loop_off,
-                                   int size, sector_t real_block);
-       char            lo_file_name[LO_NAME_SIZE];
-       char            lo_crypt_name[LO_NAME_SIZE];
-       char            lo_encrypt_key[LO_KEY_SIZE];
-       int             lo_encrypt_key_size;
-       struct loop_func_table *lo_encryption;
-       __u32           lo_init[2];
-       kuid_t          lo_key_owner;   /* Who set the key */
-       int             (*ioctl)(struct loop_device *, int cmd, 
-                                unsigned long arg); 
-
-       struct file *   lo_backing_file;
-       struct block_device *lo_device;
-       unsigned        lo_blocksize;
-       void            *key_data; 
-
-       gfp_t           old_gfp_mask;
-
-       spinlock_t              lo_lock;
-       struct bio_list         lo_bio_list;
-       unsigned int            lo_bio_count;
-       int                     lo_state;
-       struct mutex            lo_ctl_mutex;
-       struct task_struct      *lo_thread;
-       wait_queue_head_t       lo_event;
-       /* wait queue for incoming requests */
-       wait_queue_head_t       lo_req_wait;
-
-       struct request_queue    *lo_queue;
-       struct gendisk          *lo_disk;
-};
-
-/* Support for loadable transfer modules */
-struct loop_func_table {
-       int number;     /* filter type */ 
-       int (*transfer)(struct loop_device *lo, int cmd,
-                       struct page *raw_page, unsigned raw_off,
-                       struct page *loop_page, unsigned loop_off,
-                       int size, sector_t real_block);
-       int (*init)(struct loop_device *, const struct loop_info64 *); 
-       /* release is called from loop_unregister_transfer or clr_fd */
-       int (*release)(struct loop_device *); 
-       int (*ioctl)(struct loop_device *, int cmd, unsigned long arg);
-       struct module *owner;
-}; 
-
-int loop_register_transfer(struct loop_func_table *funcs);
-int loop_unregister_transfer(int number); 
-
-#endif