[PATCH] fix rmmod problems with elevator attributes, clean them up
This commit is contained in:
parent
3d1ab40f4c
commit
e572ec7e4e
5 changed files with 71 additions and 172 deletions
|
|
@ -53,6 +53,12 @@ struct elevator_ops
|
|||
|
||||
#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 elevator_type
|
|||
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 @@ enum {
|
|||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue