kernel: update bcm47xxpart failsafe partition patches
[oweals/openwrt.git] / target / linux / generic / patches-4.4 / 052-04-ubifs-Use-move-variable-in-ubifs_rename.patch
1 From: Richard Weinberger <richard@nod.at>
2 Date: Tue, 13 Sep 2016 16:18:58 +0200
3 Subject: [PATCH] ubifs: Use move variable in ubifs_rename()
4
5 ...to make the code more consistent since we use
6 move already in other places.
7
8 Signed-off-by: Richard Weinberger <richard@nod.at>
9 ---
10
11 --- a/fs/ubifs/journal.c
12 +++ b/fs/ubifs/journal.c
13 @@ -1100,7 +1100,7 @@ int ubifs_jnl_rename(struct ubifs_info *
14         aligned_dlen1 = ALIGN(dlen1, 8);
15         aligned_dlen2 = ALIGN(dlen2, 8);
16         len = aligned_dlen1 + aligned_dlen2 + ALIGN(ilen, 8) + ALIGN(plen, 8);
17 -       if (old_dir != new_dir)
18 +       if (move)
19                 len += plen;
20         dent = kmalloc(len, GFP_NOFS);
21         if (!dent)
22 @@ -1216,7 +1216,7 @@ int ubifs_jnl_rename(struct ubifs_info *
23         if (err)
24                 goto out_ro;
25  
26 -       if (old_dir != new_dir) {
27 +       if (move) {
28                 offs += ALIGN(plen, 8);
29                 ino_key_init(c, &key, new_dir->i_ino);
30                 err = ubifs_tnc_add(c, &key, lnum, offs, plen);