7b81afbdd992f914bd04b446d3464fe04bff0425
[openwrt/staging/wigyori.git] / target / linux / generic / patches-4.9 / 031-ubifs-fix-RENAME_WHITEOUT-support.patch
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Mon, 6 Mar 2017 09:48:52 +0100
3 Subject: [PATCH] ubifs: fix RENAME_WHITEOUT support
4
5 Remove faulty leftover check in do_rename(), apparently introduced in a
6 merge that combined whiteout support changes with commit f03b8ad8d386
7 ("fs: support RENAME_NOREPLACE for local filesystems")
8
9 Fixes: 9e0a1fff8db5 ("ubifs: Implement RENAME_WHITEOUT")
10 Cc: stable@vger.kernel.org
11 Signed-off-by: Felix Fietkau <nbd@nbd.name>
12 ---
13
14 --- a/fs/ubifs/dir.c
15 +++ b/fs/ubifs/dir.c
16 @@ -1088,9 +1088,6 @@ static int do_rename(struct inode *old_d
17 struct timespec time;
18 unsigned int uninitialized_var(saved_nlink);
19
20 - if (flags & ~RENAME_NOREPLACE)
21 - return -EINVAL;
22 -
23 /*
24 * Budget request settings: deletion direntry, new direntry, removing
25 * the old inode, and changing old and new parent directory inodes.