public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Petr Vandrovec <petr@vandrovec.name>
Cc: linux-fsdevel@vger.kernel.org, aia21@cam.ac.uk,
	linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk
Subject: Re: [PATCH] Remove BKL usage from ncpfs
Date: Mon, 27 Sep 2010 16:16:41 +0200	[thread overview]
Message-ID: <201009271616.42190.arnd@arndb.de> (raw)
In-Reply-To: <20100926234733.GA31884@vana.vc.cvut.cz>

On Monday 27 September 2010, Petr Vandrovec wrote:
> commit 92498b5267aa58e85e20c7b2cbd84d1ed86df47d
> Author: Petr Vandrovec <petr@vandrovec.name>
> Date:   Sun Sep 26 16:19:12 2010 -0700
> 
>     Remove BKL from ncpfs

Hi Petr,

Thanks for taking care of this.

Would you like me to take this patch into my bkl/vfs tree? I think
that would make it easier for me because I'm adding another instance
of the BKL there, in the ncp_fill_super function. As far as I can tell
that change (see below) becomes pointless with your patch.

I could either just revert my change or replace it with your patch,
whichever you prefer.

	Arnd

diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c
index b4de38c..cdf0fce 100644
--- a/fs/ncpfs/inode.c
+++ b/fs/ncpfs/inode.c
@@ -445,10 +445,14 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
 #endif
        struct ncp_entry_info finfo;
 
+       lock_kernel();
+
        data.wdog_pid = NULL;
        server = kzalloc(sizeof(struct ncp_server), GFP_KERNEL);
-       if (!server)
+       if (!server) {
+               unlock_kernel();
                return -ENOMEM;
+       }
        sb->s_fs_info = server;
 
        error = -EFAULT;
@@ -700,6 +704,7 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
         if (!sb->s_root)
                goto out_no_root;
        sb->s_root->d_op = &ncp_root_dentry_operations;
+       unlock_kernel();
        return 0;
 
 out_no_root:
@@ -736,6 +741,7 @@ out:
        put_pid(data.wdog_pid);
        sb->s_fs_info = NULL;
        kfree(server);
+       unlock_kernel();
        return error;
 }
 


  reply	other threads:[~2010-09-27 14:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-26 23:47 [PATCH] Remove BKL usage from ncpfs Petr Vandrovec
2010-09-27 14:16 ` Arnd Bergmann [this message]
2010-09-27 17:51   ` Petr Vandrovec
2010-09-29 12:31     ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201009271616.42190.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=aia21@cam.ac.uk \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=petr@vandrovec.name \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox