summaryrefslogtreecommitdiff
path: root/fs/notify/mark.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/notify/mark.c')
-rw-r--r--fs/notify/mark.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/notify/mark.c b/fs/notify/mark.c
index 0830e0af997a..f32ca924c44e 100644
--- a/fs/notify/mark.c
+++ b/fs/notify/mark.c
@@ -572,14 +572,19 @@ void fsnotify_detach_group_marks(struct fsnotify_group *group)
}
}
-void fsnotify_destroy_marks(struct fsnotify_mark_connector *conn,
- spinlock_t *lock)
+void fsnotify_destroy_marks(struct fsnotify_mark_connector *conn)
{
struct fsnotify_mark *mark;
+ spinlock_t *lock;
if (!conn)
return;
+ if (conn->flags & FSNOTIFY_OBJ_TYPE_INODE)
+ lock = &conn->inode->i_lock;
+ else
+ lock = &conn->mnt->mnt_root->d_lock;
+
while (1) {
/*
* We have to be careful since we can race with e.g.