提交 e22fdcc8 编写于 作者: A Al Viro

lustre: switch ll_release_openhandle() to struct inode *

Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 2a8a3597
...@@ -430,7 +430,7 @@ static int ll_intent_file_open(struct dentry *dentry, void *lmm, ...@@ -430,7 +430,7 @@ static int ll_intent_file_open(struct dentry *dentry, void *lmm,
if (!it_disposition(itp, DISP_OPEN_OPEN) || if (!it_disposition(itp, DISP_OPEN_OPEN) ||
it_open_error(DISP_OPEN_OPEN, itp)) it_open_error(DISP_OPEN_OPEN, itp))
goto out; goto out;
ll_release_openhandle(dentry, itp); ll_release_openhandle(inode, itp);
goto out; goto out;
} }
...@@ -620,7 +620,7 @@ int ll_file_open(struct inode *inode, struct file *file) ...@@ -620,7 +620,7 @@ int ll_file_open(struct inode *inode, struct file *file)
goto out_openerr; goto out_openerr;
} }
ll_release_openhandle(file->f_dentry, it); ll_release_openhandle(inode, it);
} }
(*och_usecount)++; (*och_usecount)++;
...@@ -1366,7 +1366,7 @@ int ll_lov_setstripe_ea_info(struct inode *inode, struct dentry *dentry, ...@@ -1366,7 +1366,7 @@ int ll_lov_setstripe_ea_info(struct inode *inode, struct dentry *dentry,
if (rc < 0) if (rc < 0)
goto out_req_free; goto out_req_free;
ll_release_openhandle(dentry, &oit); ll_release_openhandle(inode, &oit);
out_unlock: out_unlock:
ll_inode_size_unlock(inode); ll_inode_size_unlock(inode);
...@@ -1622,22 +1622,21 @@ int ll_put_grouplock(struct inode *inode, struct file *file, unsigned long arg) ...@@ -1622,22 +1622,21 @@ int ll_put_grouplock(struct inode *inode, struct file *file, unsigned long arg)
/** /**
* Close inode open handle * Close inode open handle
* *
* \param dentry [in] dentry which contains the inode * \param inode [in] inode in question
* \param it [in,out] intent which contains open info and result * \param it [in,out] intent which contains open info and result
* *
* \retval 0 success * \retval 0 success
* \retval <0 failure * \retval <0 failure
*/ */
int ll_release_openhandle(struct dentry *dentry, struct lookup_intent *it) int ll_release_openhandle(struct inode *inode, struct lookup_intent *it)
{ {
struct inode *inode = dentry->d_inode;
struct obd_client_handle *och; struct obd_client_handle *och;
int rc; int rc;
LASSERT(inode); LASSERT(inode);
/* Root ? Do nothing. */ /* Root ? Do nothing. */
if (dentry->d_inode->i_sb->s_root == dentry) if (inode->i_sb->s_root->d_inode == inode)
return 0; return 0;
/* No open handle to close? Move away */ /* No open handle to close? Move away */
......
...@@ -748,7 +748,7 @@ int ll_file_release(struct inode *inode, struct file *file); ...@@ -748,7 +748,7 @@ int ll_file_release(struct inode *inode, struct file *file);
int ll_glimpse_ioctl(struct ll_sb_info *sbi, int ll_glimpse_ioctl(struct ll_sb_info *sbi,
struct lov_stripe_md *lsm, lstat_t *st); struct lov_stripe_md *lsm, lstat_t *st);
void ll_ioepoch_open(struct ll_inode_info *lli, __u64 ioepoch); void ll_ioepoch_open(struct ll_inode_info *lli, __u64 ioepoch);
int ll_release_openhandle(struct dentry *, struct lookup_intent *); int ll_release_openhandle(struct inode *, struct lookup_intent *);
int ll_md_real_close(struct inode *inode, fmode_t fmode); int ll_md_real_close(struct inode *inode, fmode_t fmode);
void ll_ioepoch_close(struct inode *inode, struct md_op_data *op_data, void ll_ioepoch_close(struct inode *inode, struct md_op_data *op_data,
struct obd_client_handle **och, unsigned long flags); struct obd_client_handle **och, unsigned long flags);
......
...@@ -563,7 +563,7 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry, ...@@ -563,7 +563,7 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry,
if ((it->it_op & IT_OPEN) && dentry->d_inode && if ((it->it_op & IT_OPEN) && dentry->d_inode &&
!S_ISREG(dentry->d_inode->i_mode) && !S_ISREG(dentry->d_inode->i_mode) &&
!S_ISDIR(dentry->d_inode->i_mode)) { !S_ISDIR(dentry->d_inode->i_mode)) {
ll_release_openhandle(dentry, it); ll_release_openhandle(dentry->d_inode, it);
} }
ll_lookup_finish_locks(it, dentry); ll_lookup_finish_locks(it, dentry);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册