mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
fsnotify: Move ->free_mark callback to fsnotify_ops
Pointer to ->free_mark callback unnecessarily occupies one long in each fsnotify_mark although they are the same for all marks from one notification group. Move the callback pointer to fsnotify_ops. Reviewed-by: Miklos Szeredi <mszeredi@redhat.com> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
parent
7b12932340
commit
054c636e5c
12 changed files with 41 additions and 35 deletions
|
@ -104,6 +104,8 @@ struct fsnotify_ops {
|
|||
void (*free_group_priv)(struct fsnotify_group *group);
|
||||
void (*freeing_mark)(struct fsnotify_mark *mark, struct fsnotify_group *group);
|
||||
void (*free_event)(struct fsnotify_event *event);
|
||||
/* called on final put+free to free memory */
|
||||
void (*free_mark)(struct fsnotify_mark *mark);
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -261,7 +263,6 @@ struct fsnotify_mark {
|
|||
#define FSNOTIFY_MARK_FLAG_ALIVE 0x02
|
||||
#define FSNOTIFY_MARK_FLAG_ATTACHED 0x04
|
||||
unsigned int flags; /* flags [mark->lock] */
|
||||
void (*free_mark)(struct fsnotify_mark *mark); /* called on final put+free */
|
||||
};
|
||||
|
||||
#ifdef CONFIG_FSNOTIFY
|
||||
|
@ -341,8 +342,7 @@ extern struct fsnotify_event *fsnotify_remove_first_event(struct fsnotify_group
|
|||
/* Calculate mask of events for a list of marks */
|
||||
extern void fsnotify_recalc_mask(struct fsnotify_mark_connector *conn);
|
||||
extern void fsnotify_init_mark(struct fsnotify_mark *mark,
|
||||
struct fsnotify_group *group,
|
||||
void (*free_mark)(struct fsnotify_mark *mark));
|
||||
struct fsnotify_group *group);
|
||||
/* Find mark belonging to given group in the list of marks */
|
||||
extern struct fsnotify_mark *fsnotify_find_mark(
|
||||
struct fsnotify_mark_connector __rcu **connp,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue