Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S269288AbUINLME (ORCPT ); Tue, 14 Sep 2004 07:12:04 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S269277AbUINLME (ORCPT ); Tue, 14 Sep 2004 07:12:04 -0400 Received: from mx1.elte.hu ([157.181.1.137]:31365 "EHLO mx1.elte.hu") by vger.kernel.org with ESMTP id S269302AbUINLLV (ORCPT ); Tue, 14 Sep 2004 07:11:21 -0400 Date: Tue, 14 Sep 2004 13:12:36 +0200 From: Ingo Molnar To: Andrew Morton Cc: linux-kernel@vger.kernel.org, Alexander Viro Subject: [patch] might_sleep() additions to fs-writeback.c Message-ID: <20040914111236.GA592@elte.hu> References: <20040914095731.GA24622@elte.hu> <20040914100652.GB24622@elte.hu> <20040914101904.GD24622@elte.hu> <20040914102517.GE24622@elte.hu> <20040914104449.GA30790@elte.hu> <20040914105048.GA31238@elte.hu> <20040914105904.GB31370@elte.hu> <20040914110237.GC31370@elte.hu> <20040914110611.GA32077@elte.hu> <20040914110838.GA32466@elte.hu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="sm4nu43k4a2Rpi4c" Content-Disposition: inline In-Reply-To: <20040914110838.GA32466@elte.hu> User-Agent: Mutt/1.4.1i X-ELTE-SpamVersion: MailScanner 4.31.6-itk1 (ELTE 1.2) SpamAssassin 2.63 ClamAV 0.73 X-ELTE-VirusStatus: clean X-ELTE-SpamCheck: no X-ELTE-SpamCheck-Details: score=-4.9, required 5.9, autolearn=not spam, BAYES_00 -4.90 X-ELTE-SpamLevel: X-ELTE-SpamScore: -4 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1759 Lines: 65 --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline add two more might_sleep() checks: to sync_inode() and generic_osync_inode(). Signed-off-by: Ingo Molnar --- linux/fs/fs-writeback.c.orig +++ linux/fs/fs-writeback.c @@ -578,6 +578,7 @@ int sync_inode(struct inode *inode, stru { int ret; + might_sleep(); spin_lock(&inode_lock); ret = __writeback_single_inode(inode, wbc); spin_unlock(&inode_lock); @@ -622,6 +623,7 @@ int generic_osync_inode(struct inode *in } current->flags &= ~PF_SYNCWRITE; + might_sleep(); spin_lock(&inode_lock); if ((inode->i_state & I_DIRTY) && ((what & OSYNC_INODE) || (inode->i_state & I_DIRTY_DATASYNC))) --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="might_sleep-fs-writeback.patch" add two more might_sleep() checks: to sync_inode() and generic_osync_inode(). Signed-off-by: Ingo Molnar --- linux/fs/fs-writeback.c.orig +++ linux/fs/fs-writeback.c @@ -578,6 +578,7 @@ int sync_inode(struct inode *inode, stru { int ret; + might_sleep(); spin_lock(&inode_lock); ret = __writeback_single_inode(inode, wbc); spin_unlock(&inode_lock); @@ -622,6 +623,7 @@ int generic_osync_inode(struct inode *in } current->flags &= ~PF_SYNCWRITE; + might_sleep(); spin_lock(&inode_lock); if ((inode->i_state & I_DIRTY) && ((what & OSYNC_INODE) || (inode->i_state & I_DIRTY_DATASYNC))) --sm4nu43k4a2Rpi4c-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/