Commit 5d477b60 authored by Takashi Iwai's avatar Takashi Iwai Committed by Al Viro

vfs: Fix invalid ida_remove() call

When the group id of a shared mount is not allocated, the umount still
tries to call mnt_release_group_id(), which eventually hits a kernel
warning at ida_remove() spewing a message like:
  ida_remove called for id=0 which is not allocated.

This patch fixes the bug simply checking the group id in the caller.
Reported-by: default avatarCristian Rodríguez <>
Signed-off-by: default avatarTakashi Iwai <>
Signed-off-by: default avatarAl Viro <>
parent a93cb29a
......@@ -83,7 +83,8 @@ static int do_make_slave(struct mount *mnt)
if (peer_mnt == mnt)
peer_mnt = NULL;
if (IS_MNT_SHARED(mnt) && list_empty(&mnt->mnt_share))
if (mnt->mnt_group_id && IS_MNT_SHARED(mnt) &&
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment