From: Takashi Iwai Subject: [PATCH] vfs: Fix invalid ida_remove() call Date: Fri, 10 May 2013 14:04:11 +0200 Message-ID: <1368187451-6712-1-git-send-email-tiwai@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Jean Delvare , crrodriguez@opensuse.org To: Al Viro Return-path: Received: from cantor2.suse.de ([195.135.220.15]:51567 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751450Ab3EJMEM (ORCPT ); Fri, 10 May 2013 08:04:12 -0400 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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=3D0 which is not allocated. This patch fixes the bug simply checking the group id in the caller. Reported-by: Cristian Rodr=C3=ADguez Signed-off-by: Takashi Iwai --- fs/pnode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/pnode.c b/fs/pnode.c index 3d2a714..9af0df1 100644 --- a/fs/pnode.c +++ b/fs/pnode.c @@ -83,7 +83,8 @@ static int do_make_slave(struct mount *mnt) if (peer_mnt =3D=3D mnt) peer_mnt =3D NULL; } - if (IS_MNT_SHARED(mnt) && list_empty(&mnt->mnt_share)) + if (mnt->mnt_group_id && IS_MNT_SHARED(mnt) && + list_empty(&mnt->mnt_share)) mnt_release_group_id(mnt); =20 list_del_init(&mnt->mnt_share); --=20 1.8.2.1 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html