aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmir Goldstein <[email protected]>2022-04-22 15:03:18 +0300
committerJan Kara <[email protected]>2022-04-25 14:37:24 +0200
commit642054b87058019be36033f73c3e48ffff1915aa (patch)
tree5148788899e8b01047cb49ed489e22fa36038e0a
parent43b245a788e2d8f1bb742668a9bdace02fcb3e96 (diff)
inotify: use fsnotify group lock helpers
inotify inode marks pin the inode so there is no need to set the FSNOTIFY_GROUP_NOFS flag. Link: https://lore.kernel.org/r/[email protected] Suggested-by: Jan Kara <[email protected]> Link: https://lore.kernel.org/r/[email protected]/ Signed-off-by: Amir Goldstein <[email protected]> Signed-off-by: Jan Kara <[email protected]>
-rw-r--r--fs/notify/inotify/inotify_user.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c
index 146890ecd93a..ed42a189faa2 100644
--- a/fs/notify/inotify/inotify_user.c
+++ b/fs/notify/inotify/inotify_user.c
@@ -640,13 +640,13 @@ static int inotify_update_watch(struct fsnotify_group *group, struct inode *inod
{
int ret = 0;
- mutex_lock(&group->mark_mutex);
+ fsnotify_group_lock(group);
/* try to update and existing watch with the new arg */
ret = inotify_update_existing_watch(group, inode, arg);
/* no mark present, try to add a new one */
if (ret == -ENOENT)
ret = inotify_new_watch(group, inode, arg);
- mutex_unlock(&group->mark_mutex);
+ fsnotify_group_unlock(group);
return ret;
}