* [rfc][patch] fs: mntput might sleep
@ 2010-03-17 13:28 Nick Piggin
2010-03-18 1:12 ` Valerie Aurora
2010-03-18 19:03 ` Al Viro
0 siblings, 2 replies; 3+ messages in thread
From: Nick Piggin @ 2010-03-17 13:28 UTC (permalink / raw)
To: linux-fsdevel; +Cc: Al Viro
I missed this once or twice, so can we put might_sleep check into
mntput? Or does anyone call it from atomic context to drop a known
not-last reference? (if so then maybe the caller could be rewritten).
--
Index: linux-2.6/include/linux/mount.h
===================================================================
--- linux-2.6.orig/include/linux/mount.h
+++ linux-2.6/include/linux/mount.h
@@ -113,6 +113,8 @@ extern int __mnt_is_readonly(struct vfsm
static inline void mntput(struct vfsmount *mnt)
{
if (mnt) {
+ might_sleep();
+
mnt->mnt_expiry_mark = 0;
mntput_no_expire(mnt);
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [rfc][patch] fs: mntput might sleep
2010-03-17 13:28 [rfc][patch] fs: mntput might sleep Nick Piggin
@ 2010-03-18 1:12 ` Valerie Aurora
2010-03-18 19:03 ` Al Viro
1 sibling, 0 replies; 3+ messages in thread
From: Valerie Aurora @ 2010-03-18 1:12 UTC (permalink / raw)
To: Nick Piggin; +Cc: linux-fsdevel, Al Viro
On Thu, Mar 18, 2010 at 12:28:20AM +1100, Nick Piggin wrote:
> I missed this once or twice, so can we put might_sleep check into
> mntput? Or does anyone call it from atomic context to drop a known
> not-last reference? (if so then maybe the caller could be rewritten).
> --
> Index: linux-2.6/include/linux/mount.h
> ===================================================================
> --- linux-2.6.orig/include/linux/mount.h
> +++ linux-2.6/include/linux/mount.h
> @@ -113,6 +113,8 @@ extern int __mnt_is_readonly(struct vfsm
> static inline void mntput(struct vfsmount *mnt)
> {
> if (mnt) {
> + might_sleep();
> +
> mnt->mnt_expiry_mark = 0;
> mntput_no_expire(mnt);
> }
None of my union mount tests trigger it, fine by me. :)
-VAL
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [rfc][patch] fs: mntput might sleep
2010-03-17 13:28 [rfc][patch] fs: mntput might sleep Nick Piggin
2010-03-18 1:12 ` Valerie Aurora
@ 2010-03-18 19:03 ` Al Viro
1 sibling, 0 replies; 3+ messages in thread
From: Al Viro @ 2010-03-18 19:03 UTC (permalink / raw)
To: Nick Piggin; +Cc: linux-fsdevel
On Thu, Mar 18, 2010 at 12:28:20AM +1100, Nick Piggin wrote:
> I missed this once or twice, so can we put might_sleep check into
> mntput? Or does anyone call it from atomic context to drop a known
> not-last reference? (if so then maybe the caller could be rewritten).
There are places where it's called for known non-last reference under
interesting locks. I'm not sure if vfsmount_lock is one of those, but...
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-03-18 19:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-17 13:28 [rfc][patch] fs: mntput might sleep Nick Piggin
2010-03-18 1:12 ` Valerie Aurora
2010-03-18 19:03 ` Al Viro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).