From patchwork Mon Mar 6 09:04:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Fietkau X-Patchwork-Id: 735643 X-Patchwork-Delegate: richard@nod.at Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 3vcDQc4jT7z9sD5 for ; Mon, 6 Mar 2017 20:05:28 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="B6RZOB+i"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=nbd.name header.i=@nbd.name header.b="ZhJy6b2L"; dkim-atps=neutral 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: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:In-Reply-To: References:List-Owner; bh=JIbMb3hIJcsx8B117jXF7m6UpOmyoC2I9M4/lsvfvaM=; b=B6R ZOB+ijfuBCEYWjG0z8pN3106LVWSphNaU2x8yFm/y20UI6l992vqWXQgBwEfd5HXVclgXVrR8/5z0 LFU5cxf6Fb1/eWZwCFnFaZIR9i5PzRQ6Vc72o1hY4OmGzap1+3mAYHLuKOz20XH4s7GsygSrDHeHS DZn6uU1bUQ5qpb4L0shk7Qa4FKLycS5nevto8uCHrI6RomNkNhxqLRWdKahBk76ySc8fkIRETZrDs 34bIAzBiSuugDnbUjULpbvcVfMx7qCE4GGTNm6AfSrOHIHhPYdmao6q8n9qhJtC4HRqBxZ1pmtdGI QNP1b+CEx7uSkqx+LfNrRZbLpmo3QDQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1ckoZv-0005CP-7I; Mon, 06 Mar 2017 09:05:15 +0000 Received: from nbd.name ([2a01:4f8:131:30e2::2]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ckoZW-0005AZ-9Q for linux-mtd@lists.infradead.org; Mon, 06 Mar 2017 09:04:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Message-Id:Date:Subject:Cc:To:From; bh=5Yh16J/WdRtFveizwEUnQog3Zap5XBDH086DvCdKjBI=; b=ZhJy6b2LYIGGMw9uX4kHgNG7Y7gIkepFyNiDpqoeq1AuNpCIDHh01ZaxQrnh2SKKZ09+KSD4IsRCCANGwioM/6vfgcf1H8u5Y/6R+d9BB7JB1zYhsGlfxIcfGYK1ftpDh+sMZ5u0K6WPNmT8ZODYlazKQg4nAbPW7xDQoz5hv2I=; Received: by nf-4.local (Postfix, from userid 501) id 70B96194B8CE4; Mon, 6 Mar 2017 10:04:25 +0100 (CET) From: Felix Fietkau To: linux-mtd@lists.infradead.org Subject: [PATCH] ubifs: fix RENAME_WHITEOUT support Date: Mon, 6 Mar 2017 10:04:25 +0100 Message-Id: <20170306090425.61855-1-nbd@nbd.name> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170306_010450_665213_7991EA72 X-CRM114-Status: UNSURE ( 7.52 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 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: Richard Weinberger MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Remove faulty leftover check in do_rename(), apparently introduced in a merge that combined whiteout support changes with commit f03b8ad8d386 ("fs: support RENAME_NOREPLACE for local filesystems") Fixes: 9e0a1fff8db5 ("ubifs: Implement RENAME_WHITEOUT") Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau --- fs/ubifs/dir.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c index 528369f3e472..f131898b7d2b 100644 --- a/fs/ubifs/dir.c +++ b/fs/ubifs/dir.c @@ -1316,9 +1316,6 @@ static int do_rename(struct inode *old_dir, struct dentry *old_dentry, unsigned int uninitialized_var(saved_nlink); struct fscrypt_name old_nm, new_nm; - if (flags & ~RENAME_NOREPLACE) - return -EINVAL; - /* * Budget request settings: deletion direntry, new direntry, removing * the old inode, and changing old and new parent directory inodes.