From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752750AbdC2PMx (ORCPT ); Wed, 29 Mar 2017 11:12:53 -0400 Received: from bastet.se.axis.com ([195.60.68.11]:49515 "EHLO bastet.se.axis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751892AbdC2PMw (ORCPT ); Wed, 29 Mar 2017 11:12:52 -0400 Date: Wed, 29 Mar 2017 17:12:48 +0200 From: Jesper Nilsson To: Richard Weinberger , Artem Bityutskiy , Adrian Hunter , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ubifs: Don't block RENAME_WHITEOUT flag in rename Message-ID: <20170329151248.GA29118@axis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-TM-AS-GCONF: 00 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The test does not allow the valid flag RENAME_WHITEOUT and in fact, the calling function of do_rename already tests the flags, so the test is unnecessary, allowing us to drop it completely. With this patch RENAME_WHITEOUT for overlayfs on ubifs works as intended. Signed-off-by: Jesper Nilsson --- fs/ubifs/dir.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c index 30825d88..01ab543 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. -- 2.1.4 /^JN - Jesper Nilsson -- Jesper Nilsson -- jesper.nilsson@axis.com