Commit 6d2f0127 authored by John L. Hammond's avatar John L. Hammond Committed by Greg Kroah-Hartman
Browse files

staging: lustre: llite: unlock inode size in ll_lov_setstripe_ea_info()



In ll_lov_setstripe_ea_info() release the inode size lock on all
appropriate exit paths.

Signed-off-by: default avatarJohn L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6059
Reviewed-on: http://review.whamcloud.com/13167


Reviewed-by: default avatarJinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Reviewed-by: default avatarLai Siyao <lai.siyao@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a466ca4e
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -1301,7 +1301,10 @@ int ll_lov_setstripe_ea_info(struct inode *inode, struct dentry *dentry,
			     int lum_size)
{
	struct lov_stripe_md *lsm = NULL;
	struct lookup_intent oit = {.it_op = IT_OPEN, .it_flags = flags};
	struct lookup_intent oit = {
		.it_op = IT_OPEN,
		.it_flags = flags | MDS_OPEN_BY_FID,
	};
	int rc = 0;

	lsm = ccc_inode_lsm_get(inode);
@@ -1314,13 +1317,12 @@ int ll_lov_setstripe_ea_info(struct inode *inode, struct dentry *dentry,
	}

	ll_inode_size_lock(inode);
	oit.it_flags |= MDS_OPEN_BY_FID;
	rc = ll_intent_file_open(dentry, lum, lum_size, &oit);
	if (rc)
	if (rc < 0)
		goto out_unlock;
	rc = oit.it_status;
	if (rc < 0)
		goto out_req_free;
		goto out_unlock;

	ll_release_openhandle(inode, &oit);

@@ -1330,9 +1332,6 @@ int ll_lov_setstripe_ea_info(struct inode *inode, struct dentry *dentry,
	ccc_inode_lsm_put(inode, lsm);
out:
	return rc;
out_req_free:
	ptlrpc_req_finished((struct ptlrpc_request *)oit.it_request);
	goto out;
}

int ll_lov_getstripe_ea_info(struct inode *inode, const char *filename,