Skip to contentSkip to conversation

ubifs: Don't block RENAME_WHITEOUT flag in rename

PATCH New Jesper Nilsson 1 participant 1 message Mar 29, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ubifs: Don't block RENAME_WHITEOUT flag in rename

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.

---
 fs/ubifs/dir.c | 3 ---
 1 file changed, 3 deletions(-)
fs/ubifs/dir.c +0 -3
index 30825d88..01ab543 100644
@@ -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.
Signature · 6 lines
2.1.4


/^JN - Jesper Nilsson
-- 
               Jesper Nilsson -- [email protected]