Commit 4d35ca4f authored by Hyunchul Lee's avatar Hyunchul Lee Committed by Richard Weinberger

ubifs: Fix inode data budget in ubifs_mknod

Assign inode data budget to budget request correctly.
Signed-off-by: default avatarHyunchul Lee <cheol.lee@lge.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 272eda82
...@@ -1061,7 +1061,6 @@ static int ubifs_mknod(struct inode *dir, struct dentry *dentry, ...@@ -1061,7 +1061,6 @@ static int ubifs_mknod(struct inode *dir, struct dentry *dentry,
int sz_change; int sz_change;
int err, devlen = 0; int err, devlen = 0;
struct ubifs_budget_req req = { .new_ino = 1, .new_dent = 1, struct ubifs_budget_req req = { .new_ino = 1, .new_dent = 1,
.new_ino_d = ALIGN(devlen, 8),
.dirtied_ino = 1 }; .dirtied_ino = 1 };
struct fscrypt_name nm; struct fscrypt_name nm;
...@@ -1079,6 +1078,7 @@ static int ubifs_mknod(struct inode *dir, struct dentry *dentry, ...@@ -1079,6 +1078,7 @@ static int ubifs_mknod(struct inode *dir, struct dentry *dentry,
devlen = ubifs_encode_dev(dev, rdev); devlen = ubifs_encode_dev(dev, rdev);
} }
req.new_ino_d = ALIGN(devlen, 8);
err = ubifs_budget_space(c, &req); err = ubifs_budget_space(c, &req);
if (err) { if (err) {
kfree(dev); kfree(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment