* [PATCH] autofs4 - remove ioctl mutex
@ 2010-12-06 3:51 Ian Kent
2010-12-06 3:55 ` Linus Torvalds
2010-12-06 8:41 ` Arnd Bergmann
0 siblings, 2 replies; 5+ messages in thread
From: Ian Kent @ 2010-12-06 3:51 UTC (permalink / raw)
To: Linus Torvalds
Cc: Andrew Morton, linux-fsdevel, Kernel Mailing List, Arnd Bergmann,
autofs mailing list
With the recent changes to remove the BKL a mutex was added to the
ioctl entry point for calls to the old ioctl interface. This mutex
needs to be removed because of the need for the expire ioctl to call
back to the daemon to perform a umount and receive a completion
status (via another ioctl).
This should be fine as the new ioctl interface uses much of the same
code and it has been used without a mutex for around a year without
issue, as was the original intention.
---
fs/autofs4/root.c | 12 +-----------
1 files changed, 1 insertions(+), 11 deletions(-)
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index d5c1401..d34896c 100644
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -980,19 +980,11 @@ static int autofs4_root_ioctl_unlocked(struct inode *inode, struct file *filp,
}
}
-static DEFINE_MUTEX(autofs4_ioctl_mutex);
-
static long autofs4_root_ioctl(struct file *filp,
unsigned int cmd, unsigned long arg)
{
- long ret;
struct inode *inode = filp->f_dentry->d_inode;
-
- mutex_lock(&autofs4_ioctl_mutex);
- ret = autofs4_root_ioctl_unlocked(inode, filp, cmd, arg);
- mutex_unlock(&autofs4_ioctl_mutex);
-
- return ret;
+ return autofs4_root_ioctl_unlocked(inode, filp, cmd, arg);
}
#ifdef CONFIG_COMPAT
@@ -1002,13 +994,11 @@ static long autofs4_root_compat_ioctl(struct file *filp,
struct inode *inode = filp->f_path.dentry->d_inode;
int ret;
- mutex_lock(&autofs4_ioctl_mutex);
if (cmd == AUTOFS_IOC_READY || cmd == AUTOFS_IOC_FAIL)
ret = autofs4_root_ioctl_unlocked(inode, filp, cmd, arg);
else
ret = autofs4_root_ioctl_unlocked(inode, filp, cmd,
(unsigned long)compat_ptr(arg));
- mutex_unlock(&autofs4_ioctl_mutex);
return ret;
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] autofs4 - remove ioctl mutex
2010-12-06 3:51 [PATCH] autofs4 - remove ioctl mutex Ian Kent
@ 2010-12-06 3:55 ` Linus Torvalds
2010-12-06 4:05 ` Ian Kent
2010-12-06 8:41 ` Arnd Bergmann
1 sibling, 1 reply; 5+ messages in thread
From: Linus Torvalds @ 2010-12-06 3:55 UTC (permalink / raw)
To: Ian Kent
Cc: Andrew Morton, linux-fsdevel, Kernel Mailing List, Arnd Bergmann,
autofs mailing list
On Sun, Dec 5, 2010 at 7:51 PM, Ian Kent <raven@themaw.net> wrote:
> With the recent changes to remove the BKL a mutex was added to the
> ioctl entry point for calls to the old ioctl interface. This mutex
> needs to be removed because of the need for the expire ioctl to call
> back to the daemon to perform a umount and receive a completion
> status (via another ioctl).
>
> This should be fine as the new ioctl interface uses much of the same
> code and it has been used without a mutex for around a year without
> issue, as was the original intention.
Sign-off?
Linus
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] autofs4 - remove ioctl mutex
2010-12-06 3:55 ` Linus Torvalds
@ 2010-12-06 4:05 ` Ian Kent
2010-12-06 16:15 ` Linus Torvalds
0 siblings, 1 reply; 5+ messages in thread
From: Ian Kent @ 2010-12-06 4:05 UTC (permalink / raw)
To: Linus Torvalds
Cc: Andrew Morton, linux-fsdevel, Kernel Mailing List, Arnd Bergmann,
autofs mailing list
On Sun, 2010-12-05 at 19:55 -0800, Linus Torvalds wrote:
> On Sun, Dec 5, 2010 at 7:51 PM, Ian Kent <raven@themaw.net> wrote:
> > With the recent changes to remove the BKL a mutex was added to the
> > ioctl entry point for calls to the old ioctl interface. This mutex
> > needs to be removed because of the need for the expire ioctl to call
> > back to the daemon to perform a umount and receive a completion
> > status (via another ioctl).
> >
> > This should be fine as the new ioctl interface uses much of the same
> > code and it has been used without a mutex for around a year without
> > issue, as was the original intention.
>
> Sign-off?
Oops, sorry.
Would you like me to re-send after asking those concerned if I can add
their sign-off, and adding mine of course?
Ian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] autofs4 - remove ioctl mutex
2010-12-06 3:51 [PATCH] autofs4 - remove ioctl mutex Ian Kent
2010-12-06 3:55 ` Linus Torvalds
@ 2010-12-06 8:41 ` Arnd Bergmann
1 sibling, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2010-12-06 8:41 UTC (permalink / raw)
To: Ian Kent
Cc: Linus Torvalds, Andrew Morton, linux-fsdevel, Kernel Mailing List,
autofs mailing list
On Monday 06 December 2010 04:51:23 Ian Kent wrote:
> With the recent changes to remove the BKL a mutex was added to the
> ioctl entry point for calls to the old ioctl interface. This mutex
> needs to be removed because of the need for the expire ioctl to call
> back to the daemon to perform a umount and receive a completion
> status (via another ioctl).
>
> This should be fine as the new ioctl interface uses much of the same
> code and it has been used without a mutex for around a year without
> issue, as was the original intention.
Acked-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] autofs4 - remove ioctl mutex
2010-12-06 4:05 ` Ian Kent
@ 2010-12-06 16:15 ` Linus Torvalds
0 siblings, 0 replies; 5+ messages in thread
From: Linus Torvalds @ 2010-12-06 16:15 UTC (permalink / raw)
To: Ian Kent
Cc: Andrew Morton, linux-fsdevel, Kernel Mailing List, Arnd Bergmann,
autofs mailing list
On Sun, Dec 5, 2010 at 8:05 PM, Ian Kent <raven@themaw.net> wrote:
>
> Would you like me to re-send after asking those concerned if I can add
> their sign-off, and adding mine of course?
Yes, please re-send with the proper sign-offs. Based on the email that
_should_ just be yours (since there was no other author listed), but
if it came to you from somebody else, please make sure you have their
sign-off too and list them as the original author.
Linus
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-12-06 16:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-06 3:51 [PATCH] autofs4 - remove ioctl mutex Ian Kent
2010-12-06 3:55 ` Linus Torvalds
2010-12-06 4:05 ` Ian Kent
2010-12-06 16:15 ` Linus Torvalds
2010-12-06 8:41 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox