All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-kernel@vger.kernel.org,
	Stuart Swales <stuart.swales.croftnuisk@gmail.com>
Subject: Re: [PATCH 08/20] adfs: remove the big kernel lock
Date: Tue, 25 Jan 2011 22:20:30 +0000	[thread overview]
Message-ID: <20110125222030.GC23561@flint.arm.linux.org.uk> (raw)
In-Reply-To: <1295993854-4971-9-git-send-email-arnd@arndb.de>

On Tue, Jan 25, 2011 at 11:17:22PM +0100, Arnd Bergmann wrote:
> According to Russell King, adfs was written to not require the big
> kernel lock, and all inode updates are done under adfs_dir_lock.
> 
> All other metadata in adfs is read-only and does not require locking.
> The use of the BKL is the result of various pushdowns from the VFS
> operations.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Russell King <rmk@arm.linux.org.uk>

Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>

> Cc: Stuart Swales <stuart.swales.croftnuisk@gmail.com>
> ---
>  fs/adfs/Kconfig |    1 -
>  fs/adfs/dir.c   |    6 ------
>  fs/adfs/inode.c |    6 ------
>  fs/adfs/super.c |   13 +------------
>  4 files changed, 1 insertions(+), 25 deletions(-)
> 
> diff --git a/fs/adfs/Kconfig b/fs/adfs/Kconfig
> index 1dd5f34..e55182a 100644
> --- a/fs/adfs/Kconfig
> +++ b/fs/adfs/Kconfig
> @@ -1,7 +1,6 @@
>  config ADFS_FS
>  	tristate "ADFS file system support (EXPERIMENTAL)"
>  	depends on BLOCK && EXPERIMENTAL
> -	depends on BKL # need to fix
>  	help
>  	  The Acorn Disc Filing System is the standard file system of the
>  	  RiscOS operating system which runs on Acorn's ARM-based Risc PC
> diff --git a/fs/adfs/dir.c b/fs/adfs/dir.c
> index 3b4a764..3d83075 100644
> --- a/fs/adfs/dir.c
> +++ b/fs/adfs/dir.c
> @@ -9,7 +9,6 @@
>   *
>   *  Common directory handling for ADFS
>   */
> -#include <linux/smp_lock.h>
>  #include "adfs.h"
>  
>  /*
> @@ -27,8 +26,6 @@ adfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
>  	struct adfs_dir dir;
>  	int ret = 0;
>  
> -	lock_kernel();	
> -
>  	if (filp->f_pos >> 32)
>  		goto out;
>  
> @@ -70,7 +67,6 @@ free_out:
>  	ops->free(&dir);
>  
>  out:
> -	unlock_kernel();
>  	return ret;
>  }
>  
> @@ -276,7 +272,6 @@ adfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
>  	struct object_info obj;
>  	int error;
>  
> -	lock_kernel();
>  	error = adfs_dir_lookup_byname(dir, &dentry->d_name, &obj);
>  	if (error == 0) {
>  		error = -EACCES;
> @@ -288,7 +283,6 @@ adfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
>  		if (inode)
>  			error = 0;
>  	}
> -	unlock_kernel();
>  	d_add(dentry, inode);
>  	return ERR_PTR(error);
>  }
> diff --git a/fs/adfs/inode.c b/fs/adfs/inode.c
> index 65794b8..09fe401 100644
> --- a/fs/adfs/inode.c
> +++ b/fs/adfs/inode.c
> @@ -7,7 +7,6 @@
>   * it under the terms of the GNU General Public License version 2 as
>   * published by the Free Software Foundation.
>   */
> -#include <linux/smp_lock.h>
>  #include <linux/buffer_head.h>
>  #include <linux/writeback.h>
>  #include "adfs.h"
> @@ -316,8 +315,6 @@ adfs_notify_change(struct dentry *dentry, struct iattr *attr)
>  	unsigned int ia_valid = attr->ia_valid;
>  	int error;
>  	
> -	lock_kernel();
> -
>  	error = inode_change_ok(inode, attr);
>  
>  	/*
> @@ -359,7 +356,6 @@ adfs_notify_change(struct dentry *dentry, struct iattr *attr)
>  	if (ia_valid & (ATTR_SIZE | ATTR_MTIME | ATTR_MODE))
>  		mark_inode_dirty(inode);
>  out:
> -	unlock_kernel();
>  	return error;
>  }
>  
> @@ -374,7 +370,6 @@ int adfs_write_inode(struct inode *inode, struct writeback_control *wbc)
>  	struct object_info obj;
>  	int ret;
>  
> -	lock_kernel();
>  	obj.file_id	= inode->i_ino;
>  	obj.name_len	= 0;
>  	obj.parent_id	= ADFS_I(inode)->parent_id;
> @@ -384,6 +379,5 @@ int adfs_write_inode(struct inode *inode, struct writeback_control *wbc)
>  	obj.size	= inode->i_size;
>  
>  	ret = adfs_dir_update(sb, &obj, wbc->sync_mode == WB_SYNC_ALL);
> -	unlock_kernel();
>  	return ret;
>  }
> diff --git a/fs/adfs/super.c b/fs/adfs/super.c
> index 2d79540..06d7388 100644
> --- a/fs/adfs/super.c
> +++ b/fs/adfs/super.c
> @@ -14,7 +14,6 @@
>  #include <linux/mount.h>
>  #include <linux/seq_file.h>
>  #include <linux/slab.h>
> -#include <linux/smp_lock.h>
>  #include <linux/statfs.h>
>  #include "adfs.h"
>  #include "dir_f.h"
> @@ -120,15 +119,11 @@ static void adfs_put_super(struct super_block *sb)
>  	int i;
>  	struct adfs_sb_info *asb = ADFS_SB(sb);
>  
> -	lock_kernel();
> -
>  	for (i = 0; i < asb->s_map_size; i++)
>  		brelse(asb->s_map[i].dm_bh);
>  	kfree(asb->s_map);
>  	kfree(asb);
>  	sb->s_fs_info = NULL;
> -
> -	unlock_kernel();
>  }
>  
>  static int adfs_show_options(struct seq_file *seq, struct vfsmount *mnt)
> @@ -359,15 +354,11 @@ static int adfs_fill_super(struct super_block *sb, void *data, int silent)
>  	struct adfs_sb_info *asb;
>  	struct inode *root;
>  
> -	lock_kernel();
> -
>  	sb->s_flags |= MS_NODIRATIME;
>  
>  	asb = kzalloc(sizeof(*asb), GFP_KERNEL);
> -	if (!asb) {
> -		unlock_kernel();
> +	if (!asb)
>  		return -ENOMEM;
> -	}
>  	sb->s_fs_info = asb;
>  
>  	/* set default options */
> @@ -485,7 +476,6 @@ static int adfs_fill_super(struct super_block *sb, void *data, int silent)
>  		adfs_error(sb, "get root inode failed\n");
>  		goto error;
>  	}
> -	unlock_kernel();
>  	return 0;
>  
>  error_free_bh:
> @@ -493,7 +483,6 @@ error_free_bh:
>  error:
>  	sb->s_fs_info = NULL;
>  	kfree(asb);
> -	unlock_kernel();
>  	return -EINVAL;
>  }
>  
> -- 
> 1.7.1
> 

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:

  reply	other threads:[~2011-01-25 22:20 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-25 22:17 [RFC 00/20] Proposal for remaining BKL users Arnd Bergmann
2011-01-25 22:17 ` Arnd Bergmann
2011-01-25 22:17 ` [PATCH 01/20] drm/i810: remove the BKL Arnd Bergmann
2011-01-25 22:17 ` [PATCH 02/20] drm: remove i830 driver Arnd Bergmann
2011-01-25 22:17 ` [PATCH 03/20] staging/usbip: convert to kthread Arnd Bergmann
2011-01-28 17:53   ` Max Vozeler
2011-01-28 18:48     ` Arnd Bergmann
2011-03-01 22:15     ` Arnd Bergmann
2011-01-25 22:17 ` [PATCH 04/20] staging/cx25721: serialize access to devlist Arnd Bergmann
2011-01-26 16:23   ` Palash Bandyopadhyay
2011-01-31 21:37   ` Greg KH
2011-01-25 22:17 ` [PATCH 05/20] staging/go7007: remove the BKL Arnd Bergmann
2011-01-25 22:17 ` [PATCH 06/20] staging: Remove autofs3 Arnd Bergmann
2011-01-26  7:41   ` H. Peter Anvin
2011-01-25 22:17 ` [PATCH 07/20] staging: remove smbfs Arnd Bergmann
2011-01-25 22:17 ` [PATCH 08/20] adfs: remove the big kernel lock Arnd Bergmann
2011-01-25 22:20   ` Russell King [this message]
2011-01-25 22:17 ` [PATCH 09/20] hpfs: rename big kernel lock to hpfs_lock Arnd Bergmann
2011-01-25 22:17 ` [PATCH 10/20] hpfs: replace BKL with a global mutex Arnd Bergmann
2011-01-26  0:15   ` Andi Kleen
2011-01-26  0:19   ` Andi Kleen
2011-01-26 12:48     ` [PATCH v2] hpfs: remove the BKL Arnd Bergmann
2011-01-26 12:50     ` [PATCH 10/20] hpfs: replace BKL with a global mutex Arnd Bergmann
2011-01-26 16:52       ` Andi Kleen
2011-01-27  5:01         ` Nick Piggin
2011-01-27 10:57           ` Miklos Szeredi
2011-01-25 22:17 ` [PATCH 11/20] hpfs: move to drivers/staging Arnd Bergmann
2011-02-07 16:17   ` Mikulas Patocka
2011-02-07 19:31     ` Arnd Bergmann
2011-01-25 22:17 ` [PATCH 12/20] x25: remove the BKL Arnd Bergmann
2011-01-27 10:07   ` Andrew Hendry
2011-01-27 12:17     ` Arnd Bergmann
2011-01-27 12:38       ` [PATCH v2] " Arnd Bergmann
2011-01-27 13:20         ` Eric Dumazet
2011-01-27 13:43           ` Arnd Bergmann
2011-01-25 22:17 ` [PATCH 13/20] appletalk: move to staging Arnd Bergmann
2011-01-25 22:17 ` [PATCH 14/20] staging/appletalk: remove the BKL Arnd Bergmann
2011-01-25 22:29   ` David Miller
2011-01-26 12:57     ` Arnd Bergmann
2011-01-25 22:17 ` [PATCH 15/20] ufs: " Arnd Bergmann
2011-01-26  2:30   ` Nick Bowler
2011-01-26 12:53     ` Arnd Bergmann
2011-01-27  5:47   ` Nick Piggin
2011-01-27 13:13     ` Arnd Bergmann
2011-01-25 22:17 ` [PATCH 16/20] ipx: " Arnd Bergmann
2011-01-25 22:17 ` [PATCH 17/20] tracing: don't trace " Arnd Bergmann
2011-01-25 22:28   ` Frederic Weisbecker
2011-01-25 22:17 ` [PATCH 18/20] rtmutex-tester: remove BKL tests Arnd Bergmann
2011-01-26 15:00   ` [tip:core/locking] rtmutex-tester: Remove " tip-bot for Arnd Bergmann
2011-02-22 20:57   ` [tip:irq/core] rtmutex: tester: " tip-bot for Arnd Bergmann
2011-01-25 22:17 ` [PATCH 19/20] drivers: remove extraneous includes of smp_lock.h Arnd Bergmann
2011-01-25 22:17 ` [PATCH 20/20] BKL: That's all, folks Arnd Bergmann
2011-01-26  6:19   ` Ingo Molnar
2011-01-26  8:47     ` Alan Cox
2011-01-26 11:01       ` Ingo Molnar
2011-01-26 11:22   ` Thomas Gleixner
2011-01-26  2:22 ` [RFC 00/20] Proposal for remaining BKL users Greg KH
2011-01-26  2:22   ` Greg KH
2011-01-26 11:31   ` Arnd Bergmann
2011-01-26 11:31     ` Arnd Bergmann
2011-01-26 11:58     ` Mauro Carvalho Chehab
2011-01-26 13:45       ` Arnd Bergmann
2011-01-26 13:45         ` Arnd Bergmann
2011-01-26 16:24         ` Palash Bandyopadhyay

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=20110125222030.GC23561@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stuart.swales.croftnuisk@gmail.com \
    --subject='Re: [PATCH 08/20] adfs: remove the big kernel lock' \
    /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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.