removed = fanotify_mark_remove_from_mask(fsn_mark, mask, flags);
fsnotify_put_mark(fsn_mark);
- if (removed & mnt->mnt_fsnotify_mask)
+ if (removed & real_mount(mnt)->mnt_fsnotify_mask)
fsnotify_recalc_vfsmount_mask(mnt);
+ ret = 0;
+ err:
+ mutex_unlock(&group->mutex);
- return 0;
+ return ret;
}
static int fanotify_remove_inode_mark(struct fsnotify_group *group,
}
added = fanotify_mark_add_to_mask(fsn_mark, mask, flags);
- if (added & ~mnt->mnt_fsnotify_mask)
+ if (added & ~real_mount(mnt)->mnt_fsnotify_mask)
fsnotify_recalc_vfsmount_mask(mnt);
- err:
+ ret = 0;
+ err2:
fsnotify_put_mark(fsn_mark);
+ err:
+ mutex_unlock(&group->mutex);
return ret;
}