From patchwork Tue Aug 25 15:27:04 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artem Bityutskiy X-Patchwork-Id: 32074 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id C7B12B7B93 for ; Wed, 26 Aug 2009 01:31:17 +1000 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1MfxwU-00046b-SA; Tue, 25 Aug 2009 15:28:14 +0000 Received: from smtp.nokia.com ([192.100.122.230] helo=mgw-mx03.nokia.com) by bombadil.infradead.org with esmtps (Exim 4.69 #1 (Red Hat Linux)) id 1MfxwO-00045a-Up for linux-mtd@lists.infradead.org; Tue, 25 Aug 2009 15:28:13 +0000 Received: from vaebh105.NOE.Nokia.com (vaebh105.europe.nokia.com [10.160.244.31]) by mgw-mx03.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n7PFRn91024357 for ; Tue, 25 Aug 2009 18:27:58 +0300 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by vaebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 25 Aug 2009 18:27:40 +0300 Received: from mgw-da02.ext.nokia.com ([147.243.128.26]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Tue, 25 Aug 2009 18:27:39 +0300 Received: from localhost.localdomain (esdhcp041157.research.nokia.com [172.21.41.157]) by mgw-da02.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n7PFRVpM006243; Tue, 25 Aug 2009 18:27:32 +0300 From: Artem Bityutskiy To: Adrian Hunter Subject: [PATCH] UBIFS: fix commentaries Date: Tue, 25 Aug 2009 18:27:04 +0300 Message-Id: <1251214024-2777-1-git-send-email-dedekind@infradead.org> X-Mailer: git-send-email 1.6.2.5 X-OriginalArrivalTime: 25 Aug 2009 15:27:40.0114 (UTC) FILETIME=[9527A320:01CA2598] X-Nokia-AV: Clean X-Spam-Score: -4.0 (----) X-Spam-Report: SpamAssassin version 3.2.5 on bombadil.infradead.org summary: Content analysis details: (-4.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -4.0 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [192.100.122.230 listed in list.dnswl.org] Cc: linux-mtd@lists.infradead.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Artem Bityutskiy Change "write-back does take inode @i_mutex" to "write-back does not take inode @i_mutex" type. IOW, this patch just adds "not" word, the rest of the changes are just re-formatting to fit the 80 characters line limit. Signed-off-by: Artem Bityutskiy --- fs/ubifs/file.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index 6d34dc7..ff43f60 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c @@ -965,12 +965,12 @@ static int do_writepage(struct page *page, int len) * and then keeps writing pages back. * * Some locking issues explanation. 'ubifs_writepage()' first is called with - * the page locked, and it locks @ui_mutex. However, write-back does take inode - * @i_mutex, which means other VFS operations may be run on this inode at the - * same time. And the problematic one is truncation to smaller size, from where - * we have to call 'vmtruncate()', which first changes @inode->i_size, then - * drops the truncated pages. And while dropping the pages, it takes the page - * lock. This means that 'do_truncation()' cannot call 'vmtruncate()' with + * the page locked, and it locks @ui_mutex. However, write-back does not take + * inode @i_mutex, which means other VFS operations may be run on this inode at + * the same time. And the problematic one is truncation to smaller size, from + * where we have to call 'vmtruncate()', which first changes @inode->i_size, + * then drops the truncated pages. And while dropping the pages, it takes the + * page lock. This means that 'do_truncation()' cannot call 'vmtruncate()' with * @ui_mutex locked, because it would deadlock with 'ubifs_writepage()'. This * means that @inode->i_size is changed while @ui_mutex is unlocked. *