diff options
Diffstat (limited to 'drivers/staging/lustre/lustre/llite/dcache.c')
-rw-r--r-- | drivers/staging/lustre/lustre/llite/dcache.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/drivers/staging/lustre/lustre/llite/dcache.c b/drivers/staging/lustre/lustre/llite/dcache.c index 8b5508086174..7d520d8f4a69 100644 --- a/drivers/staging/lustre/lustre/llite/dcache.c +++ b/drivers/staging/lustre/lustre/llite/dcache.c @@ -69,8 +69,7 @@ static void ll_release(struct dentry *de) ll_intent_release(lld->lld_it); OBD_FREE(lld->lld_it, sizeof(*lld->lld_it)); } - LASSERT(lld->lld_cwd_count == 0); - LASSERT(lld->lld_mnt_count == 0); + de->d_fsdata = NULL; call_rcu(&lld->lld_rcu_head, free_dentry_data); } @@ -82,8 +81,9 @@ static void ll_release(struct dentry *de) * an AST before calling d_revalidate_it(). The dentry still exists (marked * INVALID) so d_lookup() matches it, but we have no lock on it (so * lock_match() fails) and we spin around real_lookup(). */ -int ll_dcompare(const struct dentry *parent, const struct dentry *dentry, - unsigned int len, const char *str, const struct qstr *name) +static int ll_dcompare(const struct dentry *parent, const struct dentry *dentry, + unsigned int len, const char *str, + const struct qstr *name) { if (len != name->len) return 1; @@ -238,7 +238,8 @@ void ll_intent_release(struct lookup_intent *it) ll_intent_drop_lock(it); /* We are still holding extra reference on a request, need to free it */ if (it_disposition(it, DISP_ENQ_OPEN_REF)) - ptlrpc_req_finished(it->d.lustre.it_data); /* ll_file_open */ + ptlrpc_req_finished(it->d.lustre.it_data); /* ll_file_open */ + if (it_disposition(it, DISP_ENQ_CREATE_REF)) /* create rec */ ptlrpc_req_finished(it->d.lustre.it_data); @@ -316,15 +317,6 @@ void ll_lookup_finish_locks(struct lookup_intent *it, struct dentry *dentry) } } -void ll_frob_intent(struct lookup_intent **itp, struct lookup_intent *deft) -{ - struct lookup_intent *it = *itp; - - if (!it || it->it_op == IT_GETXATTR) - it = *itp = deft; - -} - static int ll_revalidate_dentry(struct dentry *dentry, unsigned int lookup_flags) { @@ -356,7 +348,7 @@ static int ll_revalidate_dentry(struct dentry *dentry, /* * Always trust cached dentries. Update statahead window if necessary. */ -int ll_revalidate_nd(struct dentry *dentry, unsigned int flags) +static int ll_revalidate_nd(struct dentry *dentry, unsigned int flags) { int rc; @@ -368,7 +360,7 @@ int ll_revalidate_nd(struct dentry *dentry, unsigned int flags) } -void ll_d_iput(struct dentry *de, struct inode *inode) +static void ll_d_iput(struct dentry *de, struct inode *inode) { LASSERT(inode); if (!find_cbdata(inode)) @@ -376,7 +368,7 @@ void ll_d_iput(struct dentry *de, struct inode *inode) iput(inode); } -struct dentry_operations ll_d_ops = { +const struct dentry_operations ll_d_ops = { .d_revalidate = ll_revalidate_nd, .d_release = ll_release, .d_delete = ll_ddelete, |