public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: John Kacur <jkacur@redhat.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH 5/6] smbfs: BKL ioctl pushdown
Date: Mon, 17 May 2010 04:26:36 +0200	[thread overview]
Message-ID: <20100517022635.GF22299@nowhere> (raw)
In-Reply-To: <1273065339-21669-6-git-send-email-jkacur@redhat.com>

On Wed, May 05, 2010 at 03:15:38PM +0200, John Kacur wrote:
> Convert smb_ioctl to an unlocked ioctl and push down the bkl into it.
> 
> Signed-off-by: John Kacur <jkacur@redhat.com>


Applied, thanks.



> ---
>  fs/smbfs/dir.c   |    2 +-
>  fs/smbfs/file.c  |    2 +-
>  fs/smbfs/ioctl.c |   10 +++++++---
>  fs/smbfs/proto.h |    2 +-
>  4 files changed, 10 insertions(+), 6 deletions(-)
> 
> diff --git a/fs/smbfs/dir.c b/fs/smbfs/dir.c
> index 3e4803b..6c97842 100644
> --- a/fs/smbfs/dir.c
> +++ b/fs/smbfs/dir.c
> @@ -39,7 +39,7 @@ const struct file_operations smb_dir_operations =
>  {
>  	.read		= generic_read_dir,
>  	.readdir	= smb_readdir,
> -	.ioctl		= smb_ioctl,
> +	.unlocked_ioctl	= smb_ioctl,
>  	.open		= smb_dir_open,
>  };
>  
> diff --git a/fs/smbfs/file.c b/fs/smbfs/file.c
> index dbf6548..84ecf0e 100644
> --- a/fs/smbfs/file.c
> +++ b/fs/smbfs/file.c
> @@ -437,7 +437,7 @@ const struct file_operations smb_file_operations =
>  	.aio_read	= smb_file_aio_read,
>  	.write		= do_sync_write,
>  	.aio_write	= smb_file_aio_write,
> -	.ioctl		= smb_ioctl,
> +	.unlocked_ioctl	= smb_ioctl,
>  	.mmap		= smb_file_mmap,
>  	.open		= smb_file_open,
>  	.release	= smb_file_release,
> diff --git a/fs/smbfs/ioctl.c b/fs/smbfs/ioctl.c
> index dbae1f8..dfc3a94 100644
> --- a/fs/smbfs/ioctl.c
> +++ b/fs/smbfs/ioctl.c
> @@ -19,17 +19,19 @@
>  #include <linux/smb_mount.h>
>  
>  #include <asm/uaccess.h>
> +#include <linux/smp_lock.h>
>  
>  #include "proto.h"
>  
> -int
> -smb_ioctl(struct inode *inode, struct file *filp,
> -	  unsigned int cmd, unsigned long arg)
> +long smb_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
>  {
> +	struct inode *inode = filp->f_dentry->d_inode;
>  	struct smb_sb_info *server = server_from_inode(inode);
>  	struct smb_conn_opt opt;
>  	int result = -EINVAL;
>  
> +	lock_kernel();
> +
>  	switch (cmd) {
>  		uid16_t uid16;
>  		uid_t uid32;
> @@ -63,5 +65,7 @@ smb_ioctl(struct inode *inode, struct file *filp,
>  		break;
>  	}
>  
> +	unlock_kernel();
> +
>  	return result;
>  }
> diff --git a/fs/smbfs/proto.h b/fs/smbfs/proto.h
> index 03f456c..05939a6 100644
> --- a/fs/smbfs/proto.h
> +++ b/fs/smbfs/proto.h
> @@ -67,7 +67,7 @@ extern const struct address_space_operations smb_file_aops;
>  extern const struct file_operations smb_file_operations;
>  extern const struct inode_operations smb_file_inode_operations;
>  /* ioctl.c */
> -extern int smb_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);
> +extern long smb_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
>  /* smbiod.c */
>  extern void smbiod_wake_up(void);
>  extern int smbiod_register_server(struct smb_sb_info *server);
> -- 
> 1.6.6.1
> 


  reply	other threads:[~2010-05-17  2:26 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-05 13:15 [PATCH 0/6] BKL ioctl pushdown John Kacur
2010-05-05 13:15 ` [PATCH 1/6] coda: " John Kacur
2010-05-17  2:10   ` Frederic Weisbecker
2010-05-05 13:15 ` [PATCH 2/6] coda: Clean-up whitespace problems in pioctl.c John Kacur
2010-05-17  2:13   ` Frederic Weisbecker
2010-05-05 13:15 ` [PATCH 3/6] fat: BKL ioctl pushdown John Kacur
2010-05-05 16:04   ` OGAWA Hirofumi
2010-05-05 17:34     ` John Kacur
2010-05-05 18:30       ` OGAWA Hirofumi
2010-05-05 19:55         ` [PATCH] fat: convert to unlocked_ioctl Arnd Bergmann
2010-05-05 21:06           ` OGAWA Hirofumi
2010-05-05 20:16         ` [PATCH 3/6] fat: BKL ioctl pushdown John Kacur
2010-05-05 13:15 ` [PATCH 4/6] ncpfs: " John Kacur
2010-05-17  2:24   ` Frederic Weisbecker
2010-05-05 13:15 ` [PATCH 5/6] smbfs: " John Kacur
2010-05-17  2:26   ` Frederic Weisbecker [this message]
2010-05-17  2:35   ` Frederic Weisbecker
2010-05-17 11:46     ` John Kacur
2010-05-05 13:15 ` [PATCH 6/6] udf: " John Kacur
2010-05-05 14:39   ` Jan Kara
2010-05-11  7:08 ` [PATCH 0/6] " Frederic Weisbecker

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=20100517022635.GF22299@nowhere \
    --to=fweisbec@gmail.com \
    --cc=arnd@arndb.de \
    --cc=jkacur@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /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