fs: mntput might sleep
RFC PATCH 1/1 fs: mntput might sleep
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). --
include/linux/mount.h +2 -0
@@ -113,6 +113,8 @@ extern int __mnt_is_readonly(struct vfsmstatic inline void mntput (struct vfsmount *mnt) {if (mnt) { +might_sleep (); + mnt->mnt_expiry_mark =0 ;mntput_no_expire (mnt); }
Quoted 9 lines · Nick Piggin
I missed this once or twice, so can we put
might_sleepcheck 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
===================================================================
include/linux/mount.h extern int __mnt_is_readonly(struct vfsm · line 120
Quoted 8 lines
include/linux/mount.h +2
-0@@ -113,6 +113,8 @@ extern int __mnt_is_readonly(struct vfsmstatic 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
Al Viro
maintainerQuoted 3 lines · Nick Piggin
I missed this once or twice, so can we put
might_sleepcheck 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...