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

Commit e2a29943 authored by Lino Sanfilippo's avatar Lino Sanfilippo Committed by Eric Paris
Browse files

fsnotify: pass group to fsnotify_destroy_mark()



In fsnotify_destroy_mark() dont get the group from the passed mark anymore,
but pass the group itself as an additional parameter to the function.

Signed-off-by: default avatarLino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: default avatarEric Paris <eparis@redhat.com>
parent 986ab098
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -201,7 +201,7 @@ void dnotify_flush(struct file *filp, fl_owner_t id)

	/* nothing else could have found us thanks to the dnotify_mark_mutex */
	if (dn_mark->dn == NULL)
		fsnotify_destroy_mark(fsn_mark);
		fsnotify_destroy_mark(fsn_mark, dnotify_group);

	mutex_unlock(&dnotify_mark_mutex);

@@ -385,7 +385,7 @@ int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg)
	spin_unlock(&fsn_mark->lock);

	if (destroy)
		fsnotify_destroy_mark(fsn_mark);
		fsnotify_destroy_mark(fsn_mark, dnotify_group);

	mutex_unlock(&dnotify_mark_mutex);
	fsnotify_put_mark(fsn_mark);
+2 −2
Original line number Diff line number Diff line
@@ -546,7 +546,7 @@ static int fanotify_remove_vfsmount_mark(struct fsnotify_group *group,
	removed = fanotify_mark_remove_from_mask(fsn_mark, mask, flags,
						 &destroy_mark);
	if (destroy_mark)
		fsnotify_destroy_mark(fsn_mark);
		fsnotify_destroy_mark(fsn_mark, group);

	fsnotify_put_mark(fsn_mark);
	if (removed & real_mount(mnt)->mnt_fsnotify_mask)
@@ -570,7 +570,7 @@ static int fanotify_remove_inode_mark(struct fsnotify_group *group,
	removed = fanotify_mark_remove_from_mask(fsn_mark, mask, flags,
						 &destroy_mark);
	if (destroy_mark)
		fsnotify_destroy_mark(fsn_mark);
		fsnotify_destroy_mark(fsn_mark, group);
	/* matches the fsnotify_find_inode_mark() */
	fsnotify_put_mark(fsn_mark);
	if (removed & inode->i_fsnotify_mask)
+9 −1
Original line number Diff line number Diff line
@@ -99,8 +99,16 @@ void fsnotify_clear_marks_by_inode(struct inode *inode)
	spin_unlock(&inode->i_lock);

	list_for_each_entry_safe(mark, lmark, &free_list, i.free_i_list) {
		fsnotify_destroy_mark(mark);
		struct fsnotify_group *group;

		spin_lock(&mark->lock);
		fsnotify_get_group(mark->group);
		group = mark->group;
		spin_unlock(&mark->lock);

		fsnotify_destroy_mark(mark, group);
		fsnotify_put_mark(mark);
		fsnotify_put_group(group);
	}
}

+1 −1
Original line number Diff line number Diff line
@@ -132,7 +132,7 @@ static int inotify_handle_event(struct fsnotify_group *group,
	}

	if (inode_mark->mask & IN_ONESHOT)
		fsnotify_destroy_mark(inode_mark);
		fsnotify_destroy_mark(inode_mark, group);

	return ret;
}
+1 −1
Original line number Diff line number Diff line
@@ -816,7 +816,7 @@ SYSCALL_DEFINE2(inotify_rm_watch, int, fd, __s32, wd)

	ret = 0;

	fsnotify_destroy_mark(&i_mark->fsn_mark);
	fsnotify_destroy_mark(&i_mark->fsn_mark, group);

	/* match ref taken by inotify_idr_find */
	fsnotify_put_mark(&i_mark->fsn_mark);
Loading