> From: Takashi Iwai <[email protected]>
> Subject: 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.
> 
> Signed-off-by: Takashi Iwai <[email protected]>
> Reported-by: Cristian Rodr�guez <[email protected]>
> Cc: Al Viro <[email protected]>
> Signed-off-by: Andrew Morton <[email protected]>
> ---
> 

Tested-by Chen Gang <[email protected]>

Thanks.


>  fs/pnode.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff -puN fs/pnode.c~vfs-fix-invalid-ida_remove-call fs/pnode.c
> --- a/fs/pnode.c~vfs-fix-invalid-ida_remove-call
> +++ a/fs/pnode.c
> @@ -83,7 +83,8 @@ static int do_make_slave(struct mount *m
>               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) &&
> +         list_empty(&mnt->mnt_share))
>               mnt_release_group_id(mnt);
>  
>       list_del_init(&mnt->mnt_share);
> _
> 
> 
> 


-- 
Chen Gang

Asianux Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to