diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ubifs/file.c | 1 | ||||
-rw-r--r-- | fs/ubifs/journal.c | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index b5b593c45270..538519ee37d9 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c | |||
@@ -262,6 +262,7 @@ static int write_begin_slow(struct address_space *mapping, | |||
262 | if (err) { | 262 | if (err) { |
263 | unlock_page(page); | 263 | unlock_page(page); |
264 | page_cache_release(page); | 264 | page_cache_release(page); |
265 | ubifs_release_budget(c, &req); | ||
265 | return err; | 266 | return err; |
266 | } | 267 | } |
267 | } | 268 | } |
diff --git a/fs/ubifs/journal.c b/fs/ubifs/journal.c index fb166e204441..f6ac3f29323c 100644 --- a/fs/ubifs/journal.c +++ b/fs/ubifs/journal.c | |||
@@ -571,7 +571,11 @@ int ubifs_jnl_update(struct ubifs_info *c, const struct inode *dir, | |||
571 | 571 | ||
572 | aligned_dlen = ALIGN(dlen, 8); | 572 | aligned_dlen = ALIGN(dlen, 8); |
573 | aligned_ilen = ALIGN(ilen, 8); | 573 | aligned_ilen = ALIGN(ilen, 8); |
574 | |||
574 | len = aligned_dlen + aligned_ilen + UBIFS_INO_NODE_SZ; | 575 | len = aligned_dlen + aligned_ilen + UBIFS_INO_NODE_SZ; |
576 | /* Make sure to also account for extended attributes */ | ||
577 | len += host_ui->data_len; | ||
578 | |||
575 | dent = kmalloc(len, GFP_NOFS); | 579 | dent = kmalloc(len, GFP_NOFS); |
576 | if (!dent) | 580 | if (!dent) |
577 | return -ENOMEM; | 581 | return -ENOMEM; |
@@ -648,7 +652,8 @@ int ubifs_jnl_update(struct ubifs_info *c, const struct inode *dir, | |||
648 | 652 | ||
649 | ino_key_init(c, &ino_key, dir->i_ino); | 653 | ino_key_init(c, &ino_key, dir->i_ino); |
650 | ino_offs += aligned_ilen; | 654 | ino_offs += aligned_ilen; |
651 | err = ubifs_tnc_add(c, &ino_key, lnum, ino_offs, UBIFS_INO_NODE_SZ); | 655 | err = ubifs_tnc_add(c, &ino_key, lnum, ino_offs, |
656 | UBIFS_INO_NODE_SZ + host_ui->data_len); | ||
652 | if (err) | 657 | if (err) |
653 | goto out_ro; | 658 | goto out_ro; |
654 | 659 | ||