Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b6e5434 authored by Amir Goldstein's avatar Amir Goldstein Committed by Jan Kara
Browse files

fsnotify: use typedef fsnotify_connp_t for brevity



The object marks manipulation functions fsnotify_destroy_marks()
fsnotify_find_mark() and their helpers take an argument of type
struct fsnotify_mark_connector __rcu ** to dereference the connector
pointer. use a typedef to describe this type for brevity.

Signed-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent 81383502
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -19,8 +19,8 @@ extern struct srcu_struct fsnotify_mark_srcu;
extern int fsnotify_compare_groups(struct fsnotify_group *a,
				   struct fsnotify_group *b);

/* Destroy all marks connected via given connector */
extern void fsnotify_destroy_marks(struct fsnotify_mark_connector __rcu **connp);
/* Destroy all marks attached to an object via connector */
extern void fsnotify_destroy_marks(fsnotify_connp_t *connp);
/* run the list of all marks associated with inode and destroy them */
static inline void fsnotify_clear_marks_by_inode(struct inode *inode)
{
+9 −11
Original line number Diff line number Diff line
@@ -436,8 +436,7 @@ int fsnotify_compare_groups(struct fsnotify_group *a, struct fsnotify_group *b)
	return -1;
}

static int fsnotify_attach_connector_to_object(
				struct fsnotify_mark_connector __rcu **connp,
static int fsnotify_attach_connector_to_object(fsnotify_connp_t *connp,
					       struct inode *inode,
					       struct vfsmount *mnt)
{
@@ -476,7 +475,7 @@ static int fsnotify_attach_connector_to_object(
 * they are sure list cannot go away under them.
 */
static struct fsnotify_mark_connector *fsnotify_grab_connector(
				struct fsnotify_mark_connector __rcu **connp)
						fsnotify_connp_t *connp)
{
	struct fsnotify_mark_connector *conn;
	int idx;
@@ -508,7 +507,7 @@ static int fsnotify_add_mark_list(struct fsnotify_mark *mark,
{
	struct fsnotify_mark *lmark, *last = NULL;
	struct fsnotify_mark_connector *conn;
	struct fsnotify_mark_connector __rcu **connp;
	fsnotify_connp_t *connp;
	int cmp;
	int err = 0;

@@ -629,8 +628,7 @@ int fsnotify_add_mark(struct fsnotify_mark *mark, struct inode *inode,
 * Given a list of marks, find the mark associated with given group. If found
 * take a reference to that mark and return it, else return NULL.
 */
struct fsnotify_mark *fsnotify_find_mark(
				struct fsnotify_mark_connector __rcu **connp,
struct fsnotify_mark *fsnotify_find_mark(fsnotify_connp_t *connp,
					 struct fsnotify_group *group)
{
	struct fsnotify_mark_connector *conn;
@@ -697,8 +695,8 @@ void fsnotify_clear_marks_by_group(struct fsnotify_group *group,
	}
}

/* Destroy all marks attached to inode / vfsmount */
void fsnotify_destroy_marks(struct fsnotify_mark_connector __rcu **connp)
/* Destroy all marks attached to an object via connector */
void fsnotify_destroy_marks(fsnotify_connp_t *connp)
{
	struct fsnotify_mark_connector *conn;
	struct fsnotify_mark *mark, *old_mark = NULL;
+4 −3
Original line number Diff line number Diff line
@@ -268,6 +268,8 @@ struct fsnotify_mark_connector {
	struct hlist_head list;
};

typedef struct fsnotify_mark_connector __rcu *fsnotify_connp_t;

/*
 * A mark is simply an object attached to an in core inode which allows an
 * fsnotify listener to indicate they are either no longer interested in events
@@ -394,8 +396,7 @@ extern void fsnotify_recalc_mask(struct fsnotify_mark_connector *conn);
extern void fsnotify_init_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,
extern struct fsnotify_mark *fsnotify_find_mark(fsnotify_connp_t *connp,
						struct fsnotify_group *group);
/* attach the mark to the inode or vfsmount */
extern int fsnotify_add_mark(struct fsnotify_mark *mark, struct inode *inode,