summaryrefslogtreecommitdiff
path: root/fs/notify/fsnotify.h
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2017-03-15 09:41:15 +0100
committerJan Kara <jack@suse.cz>2017-04-10 17:37:35 +0200
commita03e2e4f078365428bb4317989cb5d1d6563cfe9 (patch)
treedaa8ada03fa6b829a06482cbda65ffd0da044421 /fs/notify/fsnotify.h
parentf06fd98759451876f51607f60abd74c89b141610 (diff)
fsnotify: Determine lock in fsnotify_destroy_marks()
Instead of passing spinlock into fsnotify_destroy_marks() determine it directly in that function from the connector type. This will reduce code churn when changing lock protecting list of marks. Reviewed-by: Miklos Szeredi <mszeredi@redhat.com> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/notify/fsnotify.h')
-rw-r--r--fs/notify/fsnotify.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/notify/fsnotify.h b/fs/notify/fsnotify.h
index 96051780d50e..225924274f8a 100644
--- a/fs/notify/fsnotify.h
+++ b/fs/notify/fsnotify.h
@@ -26,19 +26,17 @@ extern struct inode *fsnotify_destroy_inode_mark(struct fsnotify_mark *mark);
extern struct fsnotify_mark *fsnotify_find_mark(
struct fsnotify_mark_connector *conn,
struct fsnotify_group *group);
-/* Destroy all marks connected via given connector protected by 'lock' */
-extern void fsnotify_destroy_marks(struct fsnotify_mark_connector *conn,
- spinlock_t *lock);
+/* Destroy all marks connected via given connector */
+extern void fsnotify_destroy_marks(struct fsnotify_mark_connector *conn);
/* run the list of all marks associated with inode and destroy them */
static inline void fsnotify_clear_marks_by_inode(struct inode *inode)
{
- fsnotify_destroy_marks(inode->i_fsnotify_marks, &inode->i_lock);
+ fsnotify_destroy_marks(inode->i_fsnotify_marks);
}
/* run the list of all marks associated with vfsmount and destroy them */
static inline void fsnotify_clear_marks_by_mount(struct vfsmount *mnt)
{
- fsnotify_destroy_marks(real_mount(mnt)->mnt_fsnotify_marks,
- &mnt->mnt_root->d_lock);
+ fsnotify_destroy_marks(real_mount(mnt)->mnt_fsnotify_marks);
}
/* prepare for freeing all marks associated with given group */
extern void fsnotify_detach_group_marks(struct fsnotify_group *group);