From: Dmitry Zogin Date: Thu, 4 Mar 2010 18:03:14 +0000 (-0500) Subject: b=22095 MDS operations hang when issued with lfs setstripe on a degraded OST X-Git-Tag: v1_8_2_52~21 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=fd12192a95a4075c1061c133f37aa770e1ec773f;p=fs%2Flustre-release.git b=22095 MDS operations hang when issued with lfs setstripe on a degraded OST Change the locking order in mds_lookup() o=jfilizetti@sms-fed.com i=johann i=adilger --- diff --git a/lustre/mds/mds_reint.c b/lustre/mds/mds_reint.c index 97dc613..e71fe2c 100644 --- a/lustre/mds/mds_reint.c +++ b/lustre/mds/mds_reint.c @@ -98,15 +98,17 @@ struct dentry *mds_lookup(struct obd_device *obd, const char *fid_name, struct inode *inode = dchild->d_inode; void *handle; if (inode != NULL) { + LOCK_INODE_MUTEX(inode); handle = fsfilt_start(obd, inode, FSFILT_OP_SETATTR, NULL); if (!IS_ERR(handle)) { - LOCK_INODE_MUTEX(inode); fsfilt_set_md(obd, inode, handle, NULL, 0, "lma"); /* result is ignored. */ UNLOCK_INODE_MUTEX(inode); fsfilt_commit(obd, inode, handle, 0); + } else { + UNLOCK_INODE_MUTEX(inode); } } }