From 9c89fe0af826bfff36d8019ea6fd78db09b3c478 Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Tue, 14 Jul 2015 13:36:02 +0200 Subject: ocfs2: Handle error from dquot_initialize() dquot_initialize() can now return error. Handle it where possible. Reviewed-by: Junxiao Bi Signed-off-by: Jan Kara --- fs/ocfs2/refcounttree.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'fs/ocfs2/refcounttree.c') diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c index b69dd14..7dc818b 100644 --- a/fs/ocfs2/refcounttree.c +++ b/fs/ocfs2/refcounttree.c @@ -4419,8 +4419,9 @@ static int ocfs2_vfs_reflink(struct dentry *old_dentry, struct inode *dir, } mutex_lock(&inode->i_mutex); - dquot_initialize(dir); - error = ocfs2_reflink(old_dentry, dir, new_dentry, preserve); + error = dquot_initialize(dir); + if (!error) + error = ocfs2_reflink(old_dentry, dir, new_dentry, preserve); mutex_unlock(&inode->i_mutex); if (!error) fsnotify_create(dir, new_dentry); -- cgit v1.1