diff options
author | Jan Kara <jack@suse.com> | 2015-07-14 13:36:02 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.com> | 2015-07-23 20:59:38 +0200 |
commit | 9c89fe0af826bfff36d8019ea6fd78db09b3c478 (patch) | |
tree | a125877d6aa2e18bb452a5f86cc633a303a9fadb /fs/ocfs2/refcounttree.c | |
parent | a7cdadee0e89486ad072be7b91e477105784e0bb (diff) | |
download | linux-9c89fe0af826bfff36d8019ea6fd78db09b3c478.tar.gz linux-9c89fe0af826bfff36d8019ea6fd78db09b3c478.tar.bz2 linux-9c89fe0af826bfff36d8019ea6fd78db09b3c478.zip |
ocfs2: Handle error from dquot_initialize()
dquot_initialize() can now return error. Handle it where possible.
Reviewed-by: Junxiao Bi <junxiao.bi@oracle.com>
Signed-off-by: Jan Kara <jack@suse.com>
Diffstat (limited to 'fs/ocfs2/refcounttree.c')
-rw-r--r-- | fs/ocfs2/refcounttree.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c index b69dd14c0b9b..7dc818b87cd8 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); |