diff options
Diffstat (limited to 'fs/ubifs/tnc.c')
-rw-r--r-- | fs/ubifs/tnc.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/fs/ubifs/tnc.c b/fs/ubifs/tnc.c index 6eef5344a145..f7e36f545527 100644 --- a/fs/ubifs/tnc.c +++ b/fs/ubifs/tnc.c | |||
@@ -2245,12 +2245,11 @@ int ubifs_tnc_replace(struct ubifs_info *c, const union ubifs_key *key, | |||
2245 | if (found) { | 2245 | if (found) { |
2246 | /* Ensure the znode is dirtied */ | 2246 | /* Ensure the znode is dirtied */ |
2247 | if (znode->cnext || !ubifs_zn_dirty(znode)) { | 2247 | if (znode->cnext || !ubifs_zn_dirty(znode)) { |
2248 | znode = dirty_cow_bottom_up(c, | 2248 | znode = dirty_cow_bottom_up(c, znode); |
2249 | znode); | 2249 | if (IS_ERR(znode)) { |
2250 | if (IS_ERR(znode)) { | 2250 | err = PTR_ERR(znode); |
2251 | err = PTR_ERR(znode); | 2251 | goto out_unlock; |
2252 | goto out_unlock; | 2252 | } |
2253 | } | ||
2254 | } | 2253 | } |
2255 | zbr = &znode->zbranch[n]; | 2254 | zbr = &znode->zbranch[n]; |
2256 | lnc_free(zbr); | 2255 | lnc_free(zbr); |
@@ -2317,11 +2316,11 @@ int ubifs_tnc_add_nm(struct ubifs_info *c, const union ubifs_key *key, | |||
2317 | 2316 | ||
2318 | /* Ensure the znode is dirtied */ | 2317 | /* Ensure the znode is dirtied */ |
2319 | if (znode->cnext || !ubifs_zn_dirty(znode)) { | 2318 | if (znode->cnext || !ubifs_zn_dirty(znode)) { |
2320 | znode = dirty_cow_bottom_up(c, znode); | 2319 | znode = dirty_cow_bottom_up(c, znode); |
2321 | if (IS_ERR(znode)) { | 2320 | if (IS_ERR(znode)) { |
2322 | err = PTR_ERR(znode); | 2321 | err = PTR_ERR(znode); |
2323 | goto out_unlock; | 2322 | goto out_unlock; |
2324 | } | 2323 | } |
2325 | } | 2324 | } |
2326 | 2325 | ||
2327 | if (found == 1) { | 2326 | if (found == 1) { |
@@ -2627,11 +2626,11 @@ int ubifs_tnc_remove_range(struct ubifs_info *c, union ubifs_key *from_key, | |||
2627 | 2626 | ||
2628 | /* Ensure the znode is dirtied */ | 2627 | /* Ensure the znode is dirtied */ |
2629 | if (znode->cnext || !ubifs_zn_dirty(znode)) { | 2628 | if (znode->cnext || !ubifs_zn_dirty(znode)) { |
2630 | znode = dirty_cow_bottom_up(c, znode); | 2629 | znode = dirty_cow_bottom_up(c, znode); |
2631 | if (IS_ERR(znode)) { | 2630 | if (IS_ERR(znode)) { |
2632 | err = PTR_ERR(znode); | 2631 | err = PTR_ERR(znode); |
2633 | goto out_unlock; | 2632 | goto out_unlock; |
2634 | } | 2633 | } |
2635 | } | 2634 | } |
2636 | 2635 | ||
2637 | /* Remove all keys in range except the first */ | 2636 | /* Remove all keys in range except the first */ |