diff options
author | John L. Hammond <john.hammond@intel.com> | 2016-09-18 16:38:12 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-09-19 09:51:51 +0200 |
commit | 3f062072a50f3a2dd4b11ca20e65ea7c3fd8c086 (patch) | |
tree | f105c12a2f8a23710ade05e686c4ad0dbeaa415d /drivers/staging/lustre/lustre/llite/namei.c | |
parent | 972e54adcd435e87f15c972bb61836a1ee94a4cc (diff) |
staging: lustre: llite: remove ll_objects_destroy()
Remove ll_objects_destroy(). This function is not needed for
interoperability with servers of version 2.4 or higher.
Remove the then unused function lov_destroy() and its supporting
functions. Remove the lsm_destroy method of struct lsm_operations.
Remove the unused struct lov_stripe_md, MD export, and capa parameters
from obd_destroy() and its implementations.
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5814
Reviewed-on: http://review.whamcloud.com/12618
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/llite/namei.c')
-rw-r--r-- | drivers/staging/lustre/lustre/llite/namei.c | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c index 494140afb844..1dd5df549079 100644 --- a/drivers/staging/lustre/lustre/llite/namei.c +++ b/drivers/staging/lustre/lustre/llite/namei.c @@ -890,77 +890,6 @@ static int ll_create_nd(struct inode *dir, struct dentry *dentry, return rc; } -int ll_objects_destroy(struct ptlrpc_request *request, struct inode *dir) -{ - struct mdt_body *body; - struct lov_mds_md *eadata; - struct lov_stripe_md *lsm = NULL; - struct obd_trans_info oti = { 0 }; - struct obdo *oa; - int rc; - - /* req is swabbed so this is safe */ - body = req_capsule_server_get(&request->rq_pill, &RMF_MDT_BODY); - if (!(body->mbo_valid & OBD_MD_FLEASIZE)) - return 0; - - if (body->mbo_eadatasize == 0) { - CERROR("OBD_MD_FLEASIZE set but eadatasize zero\n"); - rc = -EPROTO; - goto out; - } - - /* The MDS sent back the EA because we unlinked the last reference - * to this file. Use this EA to unlink the objects on the OST. - * It's opaque so we don't swab here; we leave it to obd_unpackmd() to - * check it is complete and sensible. - */ - eadata = req_capsule_server_sized_get(&request->rq_pill, &RMF_MDT_MD, - body->mbo_eadatasize); - LASSERT(eadata); - - rc = obd_unpackmd(ll_i2dtexp(dir), &lsm, eadata, body->mbo_eadatasize); - if (rc < 0) { - CERROR("obd_unpackmd: %d\n", rc); - goto out; - } - LASSERT(rc >= sizeof(*lsm)); - - oa = kmem_cache_zalloc(obdo_cachep, GFP_NOFS); - if (!oa) { - rc = -ENOMEM; - goto out_free_memmd; - } - - oa->o_oi = lsm->lsm_oi; - oa->o_mode = body->mbo_mode & S_IFMT; - oa->o_valid = OBD_MD_FLID | OBD_MD_FLTYPE | OBD_MD_FLGROUP; - - if (body->mbo_valid & OBD_MD_FLCOOKIE) { - oa->o_valid |= OBD_MD_FLCOOKIE; - oti.oti_logcookies = - req_capsule_server_sized_get(&request->rq_pill, - &RMF_LOGCOOKIES, - sizeof(struct llog_cookie) * - lsm->lsm_stripe_count); - if (!oti.oti_logcookies) { - oa->o_valid &= ~OBD_MD_FLCOOKIE; - body->mbo_valid &= ~OBD_MD_FLCOOKIE; - } - } - - rc = obd_destroy(NULL, ll_i2dtexp(dir), oa, lsm, &oti, - ll_i2mdexp(dir)); - if (rc) - CERROR("obd destroy objid "DOSTID" error %d\n", - POSTID(&lsm->lsm_oi), rc); -out_free_memmd: - obd_free_memmd(ll_i2dtexp(dir), &lsm); - kmem_cache_free(obdo_cachep, oa); -out: - return rc; -} - /* ll_unlink() doesn't update the inode with the new link count. * Instead, ll_ddelete() and ll_d_iput() will update it based upon if there * is any lock existing. They will recycle dentries and inodes based upon locks @@ -994,7 +923,6 @@ static int ll_unlink(struct inode *dir, struct dentry *dchild) ll_update_times(request, dir); ll_stats_ops_tally(ll_i2sbi(dir), LPROC_LL_UNLINK, 1); - rc = ll_objects_destroy(request, dir); out: ptlrpc_req_finished(request); return rc; @@ -1130,7 +1058,6 @@ static int ll_rename(struct inode *src, struct dentry *src_dchild, ll_update_times(request, src); ll_update_times(request, tgt); ll_stats_ops_tally(sbi, LPROC_LL_RENAME, 1); - err = ll_objects_destroy(request, src); } ptlrpc_req_finished(request); |