[PATCH] fix rmmod problems with elevator attributes, clean them up
diff --git a/include/linux/elevator.h b/include/linux/elevator.h
index 4d0a80f..ad133fc 100644
--- a/include/linux/elevator.h
+++ b/include/linux/elevator.h
@@ -53,6 +53,12 @@
#define ELV_NAME_MAX (16)
+struct elv_fs_entry {
+ struct attribute attr;
+ ssize_t (*show)(elevator_t *, char *);
+ ssize_t (*store)(elevator_t *, const char *, size_t);
+};
+
/*
* identifies an elevator type, such as AS or deadline
*/
@@ -61,7 +67,7 @@
struct list_head list;
struct elevator_ops ops;
struct elevator_type *elevator_type;
- struct attribute **elevator_attrs;
+ struct elv_fs_entry *elevator_attrs;
char elevator_name[ELV_NAME_MAX];
struct module *elevator_owner;
};
@@ -142,12 +148,6 @@
ELV_MQUEUE_MUST,
};
-struct elv_fs_entry {
- struct attribute attr;
- ssize_t (*show)(elevator_t *, char *);
- ssize_t (*store)(elevator_t *, const char *, size_t);
-};
-
#define rq_end_sector(rq) ((rq)->sector + (rq)->nr_sectors)
#endif