The 'inode' var can be used rather than dereferencing dentry->d_inode
a second time.
Also re-indent the function.
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I16fb5480f7e2a8192a82e0c821597e14aad00b40
Reviewed-on: https://review.whamcloud.com/40830
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Aurelien Degremont <degremoa@amazon.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
void ll_lookup_finish_locks(struct lookup_intent *it, struct dentry *dentry)
{
void ll_lookup_finish_locks(struct lookup_intent *it, struct dentry *dentry)
{
- LASSERT(it != NULL);
- LASSERT(dentry != NULL);
+ LASSERT(it != NULL);
+ LASSERT(dentry != NULL);
if (it->it_lock_mode && dentry->d_inode != NULL) {
if (it->it_lock_mode && dentry->d_inode != NULL) {
- struct inode *inode = dentry->d_inode;
- struct ll_sb_info *sbi = ll_i2sbi(dentry->d_inode);
+ struct inode *inode = dentry->d_inode;
+ struct ll_sb_info *sbi = ll_i2sbi(inode);
CDEBUG(D_DLMTRACE, "setting l_data to inode "DFID"(%p)\n",
PFID(ll_inode2fid(inode)), inode);
CDEBUG(D_DLMTRACE, "setting l_data to inode "DFID"(%p)\n",
PFID(ll_inode2fid(inode)), inode);
- ll_set_lock_data(sbi->ll_md_exp, inode, it, NULL);
- }
-
- /* drop lookup or getattr locks immediately */
- if (it->it_op == IT_LOOKUP || it->it_op == IT_GETATTR) {
- /* on 2.6 there are situation when several lookups and
- * revalidations may be requested during single operation.
- * therefore, we don't release intent here -bzzz */
- ll_intent_drop_lock(it);
- }
+ ll_set_lock_data(sbi->ll_md_exp, inode, it, NULL);
+ }
+
+ /* drop lookup or getattr locks immediately */
+ if (it->it_op == IT_LOOKUP || it->it_op == IT_GETATTR)
+ ll_intent_drop_lock(it);
}
static int ll_revalidate_dentry(struct dentry *dentry,
}
static int ll_revalidate_dentry(struct dentry *dentry,