quota: be aware of error from dquot_initialize
authorChao Yu <yuchao0@huawei.com>
Mon, 13 Nov 2017 03:31:48 +0000 (11:31 +0800)
committerJan Kara <jack@suse.cz>
Mon, 13 Nov 2017 09:36:56 +0000 (10:36 +0100)
Commit 6184fc0b8dd7 ("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>
fs/quota/dquot.c

index f68397923ebb57fe3ac13a36944300a0b3396b50..f95e0994f87d14171d3868c65489338c973699de 100644 (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);