Re: [PATCH 2/5 -tip] cifs: umount_begin BKL pushdown

From: Matthew Wilcox
Date: Thu Apr 23 2009 - 15:19:52 EST


On Thu, Apr 23, 2009 at 09:12:02PM +0200, Alessio Igor Bogani wrote:
> @@ -525,18 +526,26 @@ static void cifs_umount_begin(struct super_block *sb)
> struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
> struct cifsTconInfo *tcon;
>
> - if (cifs_sb == NULL)
> + lock_kernel();
> +
> + if (cifs_sb == NULL) {
> + unlock_kernel();
> return;

OK, what are you doing here? Either the BKL protects the sb here,
and you need to lock_kernel() before calling CIFS_SB(sb), or the BKL
protects nothing, and the lock_kernel() should be moved down below the
test for cifs_sb.

> + }
>
> tcon = cifs_sb->tcon;
> - if (tcon == NULL)
> + if (tcon == NULL) {
> + unlock_kernel();
> return;
> + }

Likewise -- does cifs rely on the BKL to protect the 'tcon' or not?

--
Matthew Wilcox Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/