From patchwork Wed Feb 21 15:54:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 876151 X-Patchwork-Delegate: richard@nod.at Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="OiC2v98k"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zmhrj05Wmz9sWG for ; Thu, 22 Feb 2018 02:55:01 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=scByHOck3Q3WrWfu+NcesdDjowrjgTS8JvYF5gmMlhY=; b=OiC2v98kHk8wZgW7zVptaiAEiS OQ90IYEz0LUy3XzRCshcJWt2vUY3KvjY+AG+exRWWYWD/Lqv6Y6I9fKBgxY5S+bTMYOLORx4euiN9 CbS+gnxlobJjixJwBMPvY9lzRg7/YKveOfldBS5cLYjcxTXioAdYUdV1hPtw2+D8ekmX37hI+uY73 bTGWQ6v0osJhn4ti15EyXuLUjjWmU0X4YKOf+Whe7RYN+an1L03oxkHNuh1+1bnDYqXpracMNhJq2 jbIpSCSOxiFW4839ohT82ichba65NGkfK2JEaw34Ms0I7xeuPBtERURGp8VpCT4faJNAuxT28ljj9 gQr8Sr5Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eoWjO-0005Xc-7V; Wed, 21 Feb 2018 15:54:54 +0000 Received: from [107.17.164.176] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.89 #1 (Red Hat Linux)) id 1eoWjL-0005Wk-0O; Wed, 21 Feb 2018 15:54:51 +0000 From: Christoph Hellwig To: viro@zeniv.linux.org.uk Subject: [PATCH 3/4] ubifs: fix bogus __mark_inode_dirty(I_DIRTY_SYNC | I_DIRTY_DATASYNC) call Date: Wed, 21 Feb 2018 07:54:48 -0800 Message-Id: <20180221155449.25542-4-hch@lst.de> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180221155449.25542-1-hch@lst.de> References: <20180221155449.25542-1-hch@lst.de> X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fsdevel@vger.kernel.org, cluster-devel@redhat.com, linux-mtd@lists.infradead.org, linux-ntfs-dev@lists.sourceforge.net MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org I_DIRTY_DATASYNC is a strict superset of I_DIRTY_SYNC semantics, as in mark dirty to be written out by fdatasync as well. So dirtying for both flags makes no sense. Signed-off-by: Christoph Hellwig --- fs/ubifs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index cf348ba99238..1acb2ff505e6 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c @@ -1256,7 +1256,7 @@ static int do_setattr(struct ubifs_info *c, struct inode *inode, * Inode length changed, so we have to make sure * @I_DIRTY_DATASYNC is set. */ - __mark_inode_dirty(inode, I_DIRTY_SYNC | I_DIRTY_DATASYNC); + __mark_inode_dirty(inode, I_DIRTY_DATASYNC); else mark_inode_dirty_sync(inode); mutex_unlock(&ui->ui_mutex);