summaryrefslogtreecommitdiffstats
path: root/fs/ubifs
diff options
context:
space:
mode:
authorHyunchul Lee <cheol.lee@lge.com>2017-05-17 01:57:18 +0200
committerRichard Weinberger <richard@nod.at>2017-07-14 22:49:05 +0200
commit4d35ca4f774c29ec9ed676fd5112bfc83ef9853e (patch)
tree507628662ef90d92508efc3c2c26f9baf439d09c /fs/ubifs
parentubifs: Correctly evict xattr inodes (diff)
downloadlinux-4d35ca4f774c29ec9ed676fd5112bfc83ef9853e.tar.xz
linux-4d35ca4f774c29ec9ed676fd5112bfc83ef9853e.zip
ubifs: Fix inode data budget in ubifs_mknod
Assign inode data budget to budget request correctly. Signed-off-by: Hyunchul Lee <cheol.lee@lge.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/ubifs')
-rw-r--r--fs/ubifs/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c
index 566079d9b402..4e4bf8f6320f 100644
--- a/fs/ubifs/dir.c
+++ b/fs/ubifs/dir.c
@@ -1061,7 +1061,6 @@ static int ubifs_mknod(struct inode *dir, struct dentry *dentry,
int sz_change;
int err, devlen = 0;
struct ubifs_budget_req req = { .new_ino = 1, .new_dent = 1,
- .new_ino_d = ALIGN(devlen, 8),
.dirtied_ino = 1 };
struct fscrypt_name nm;
@@ -1079,6 +1078,7 @@ static int ubifs_mknod(struct inode *dir, struct dentry *dentry,
devlen = ubifs_encode_dev(dev, rdev);
}
+ req.new_ino_d = ALIGN(devlen, 8);
err = ubifs_budget_space(c, &req);
if (err) {
kfree(dev);