mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alessio Igor Bogani <abogani@texware.it>
To: Greg Kroah-Hartman <gregkh@suse.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Alessio Igor Bogani <abogani@texware.it>
Subject: [PATCH] USB: Remove BKL from remount() function in usbfs
Date: Wed, 31 Mar 2010 16:09:38 +0200	[thread overview]
Message-ID: <1270044578-4291-1-git-send-email-abogani@texware.it> (raw)

The BKL was used into remount_fs pointed function for serialized access to
super_block from the others super_operations functions.

The function update_sb(), invoked by remount(), seems already well serialized
with &root->d_inode->i_mutex. Moreover don't seems there are others
super_operations functions in USB core for usbfs that should access to
super_block in a way which require BKL.

Signed-off-by: Alessio Igor Bogani <abogani@texware.it>
---
 drivers/usb/core/inode.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/core/inode.c b/drivers/usb/core/inode.c
index 97b40ce..54972d6 100644
--- a/drivers/usb/core/inode.c
+++ b/drivers/usb/core/inode.c
@@ -39,7 +39,6 @@
 #include <linux/parser.h>
 #include <linux/notifier.h>
 #include <linux/seq_file.h>
-#include <linux/smp_lock.h>
 #include <asm/byteorder.h>
 #include "usb.h"
 #include "hcd.h"
@@ -265,13 +264,9 @@ static int remount(struct super_block *sb, int *flags, char *data)
 		return -EINVAL;
 	}
 
-	lock_kernel();
-
 	if (usbfs_mount && usbfs_mount->mnt_sb)
 		update_sb(usbfs_mount->mnt_sb);
 
-	unlock_kernel();
-
 	return 0;
 }
 
-- 
1.6.3.3


             reply	other threads:[~2010-03-31 14:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-31 14:09 Alessio Igor Bogani [this message]
2010-03-31 14:54 ` Arnd Bergmann
2010-03-31 17:21   ` Alessio Igor Bogani

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=1270044578-4291-1-git-send-email-abogani@texware.it \
    --to=abogani@texware.it \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®