diff options
author | Jan Kara <jack@suse.com> | 2015-06-29 16:22:54 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.com> | 2015-07-23 20:59:37 +0200 |
commit | a7cdadee0e89486ad072be7b91e477105784e0bb (patch) | |
tree | 4021b741aca2ba3cf718dbec1705c74fe7846071 /fs/ext4/ialloc.c | |
parent | c2edb305d6846ee8af7b5133845e23943d128e4c (diff) | |
download | linux-a7cdadee0e89486ad072be7b91e477105784e0bb.tar.gz linux-a7cdadee0e89486ad072be7b91e477105784e0bb.tar.bz2 linux-a7cdadee0e89486ad072be7b91e477105784e0bb.zip |
ext4: Handle error from dquot_initialize()
dquot_initialize() can now return error. Handle it where possible.
Acked-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Jan Kara <jack@suse.com>
Diffstat (limited to 'fs/ext4/ialloc.c')
-rw-r--r-- | fs/ext4/ialloc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index 173c1ae21395..619bfc1fda8c 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c @@ -721,7 +721,7 @@ struct inode *__ext4_new_inode(handle_t *handle, struct inode *dir, struct ext4_group_desc *gdp = NULL; struct ext4_inode_info *ei; struct ext4_sb_info *sbi; - int ret2, err = 0; + int ret2, err; struct inode *ret; ext4_group_t i; ext4_group_t flex_group; @@ -769,7 +769,9 @@ struct inode *__ext4_new_inode(handle_t *handle, struct inode *dir, inode->i_gid = dir->i_gid; } else inode_init_owner(inode, dir, mode); - dquot_initialize(inode); + err = dquot_initialize(inode); + if (err) + goto out; if (!goal) goal = sbi->s_inode_goal; |