quota: be aware of error from dquot_initialize

Commit 6184fc0b8d ("quota: Propagate error from ->acquire_dquot()")
missed to handle error from dquot_initialize in dquot_file_open, fix it.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
Chao Yu 2017-11-13 11:31:48 +08:00 committed by Jan Kara
parent dd5f627973
commit 88d8ff976a

View File

@ -2140,7 +2140,7 @@ int dquot_file_open(struct inode *inode, struct file *file)
error = generic_file_open(inode, file);
if (!error && (file->f_mode & FMODE_WRITE))
dquot_initialize(inode);
error = dquot_initialize(inode);
return error;
}
EXPORT_SYMBOL(dquot_file_open);