From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Piggin Subject: [rfc][patch] fs: mntput might sleep Date: Thu, 18 Mar 2010 00:28:20 +1100 Message-ID: <20100317132820.GH2869@laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Al Viro To: linux-fsdevel@vger.kernel.org Return-path: Received: from cantor2.suse.de ([195.135.220.15]:42276 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751011Ab0CQN2Y (ORCPT ); Wed, 17 Mar 2010 09:28:24 -0400 Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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); }