linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ubifs: Fix inode data budget in ubifs_mknod
@ 2017-05-16 23:57 Hyunchul Lee
  2017-05-17  6:58 ` Richard Weinberger
  0 siblings, 1 reply; 2+ messages in thread
From: Hyunchul Lee @ 2017-05-16 23:57 UTC (permalink / raw)
  To: Richard Weinberger
  Cc: Artem Bityutskiy, adrian.hunter, linux-kernel, linux-fsdevel,
	linux-mtd, kernel-team

Assign inode data budget to budget request correctly.

Signed-off-by: Hyunchul Lee <cheol.lee@lge.com>
---
 fs/ubifs/dir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c
index b777bdd..df67236 100644
--- a/fs/ubifs/dir.c
+++ b/fs/ubifs/dir.c
@@ -1050,7 +1050,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;
 
@@ -1068,6 +1067,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);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/2] ubifs: Fix inode data budget in ubifs_mknod
  2017-05-16 23:57 [PATCH 1/2] ubifs: Fix inode data budget in ubifs_mknod Hyunchul Lee
@ 2017-05-17  6:58 ` Richard Weinberger
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Weinberger @ 2017-05-17  6:58 UTC (permalink / raw)
  To: Hyunchul Lee
  Cc: Artem Bityutskiy, adrian.hunter, linux-kernel, linux-fsdevel,
	linux-mtd, kernel-team

Hyunchul,

Am 17.05.2017 um 01:57 schrieb Hyunchul Lee:
> Assign inode data budget to budget request correctly.
> 
> Signed-off-by: Hyunchul Lee <cheol.lee@lge.com>
> ---
>  fs/ubifs/dir.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c
> index b777bdd..df67236 100644
> --- a/fs/ubifs/dir.c
> +++ b/fs/ubifs/dir.c
> @@ -1050,7 +1050,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;
>  
> @@ -1068,6 +1067,7 @@ static int ubifs_mknod(struct inode *dir, struct dentry *dentry,
>  		devlen = ubifs_encode_dev(dev, rdev);
>  	}
>  
> +	req.new_ino_d = ALIGN(devlen, 8);

Good find!

Thanks,
//richard

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-17  6:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-16 23:57 [PATCH 1/2] ubifs: Fix inode data budget in ubifs_mknod Hyunchul Lee
2017-05-17  6:58 ` Richard Weinberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).