aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHyunchul Lee <cheol.lee@lge.com>2017-05-16 19:57:18 -0400
committerRichard Weinberger <richard@nod.at>2017-07-14 16:49:05 -0400
commit4d35ca4f774c29ec9ed676fd5112bfc83ef9853e (patch)
tree507628662ef90d92508efc3c2c26f9baf439d09c
parent272eda8298dc82eb411ece82bbb2c62911087b24 (diff)
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>
-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,
1061 int sz_change; 1061 int sz_change;
1062 int err, devlen = 0; 1062 int err, devlen = 0;
1063 struct ubifs_budget_req req = { .new_ino = 1, .new_dent = 1, 1063 struct ubifs_budget_req req = { .new_ino = 1, .new_dent = 1,
1064 .new_ino_d = ALIGN(devlen, 8),
1065 .dirtied_ino = 1 }; 1064 .dirtied_ino = 1 };
1066 struct fscrypt_name nm; 1065 struct fscrypt_name nm;
1067 1066
@@ -1079,6 +1078,7 @@ static int ubifs_mknod(struct inode *dir, struct dentry *dentry,
1079 devlen = ubifs_encode_dev(dev, rdev); 1078 devlen = ubifs_encode_dev(dev, rdev);
1080 } 1079 }
1081 1080
1081 req.new_ino_d = ALIGN(devlen, 8);
1082 err = ubifs_budget_space(c, &req); 1082 err = ubifs_budget_space(c, &req);
1083 if (err) { 1083 if (err) {
1084 kfree(dev); 1084 kfree(dev);