ocfs2: remove some unused code
authorXue jiufei <xuejiufei@huawei.com>
Wed, 4 Jun 2014 23:06:24 +0000 (16:06 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 4 Jun 2014 23:53:55 +0000 (16:53 -0700)
dlm_recovery_ctxt.received is unused.

ocfs2_should_refresh_lock_res() can only return 0 or 1, so the error
handling code in ocfs2_super_lock() is unneeded.

Signed-off-by: joyce.xue <xuejiufei@huawei.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ocfs2/dlm/dlmcommon.h
fs/ocfs2/dlm/dlmdomain.c
fs/ocfs2/dlmglue.c

index e0517762fcc014c8973398edfdb05c0db7c98ceb..a106b3f2b22a1f2cd960b186ff0b24e47b93de6a 100644 (file)
@@ -108,7 +108,6 @@ static inline int dlm_is_recovery_lock(const char *lock_name, int name_len)
 struct dlm_recovery_ctxt
 {
        struct list_head resources;
-       struct list_head received;
        struct list_head node_data;
        u8  new_master;
        u8  dead_node;
index 8d4690795a5da59de0cd6298b226526b3d4a7b5a..39efc5057a36d3106391012925e2a8a56758e24e 100644 (file)
@@ -2034,7 +2034,6 @@ static struct dlm_ctxt *dlm_alloc_ctxt(const char *domain,
        INIT_LIST_HEAD(&dlm->list);
        INIT_LIST_HEAD(&dlm->dirty_list);
        INIT_LIST_HEAD(&dlm->reco.resources);
-       INIT_LIST_HEAD(&dlm->reco.received);
        INIT_LIST_HEAD(&dlm->reco.node_data);
        INIT_LIST_HEAD(&dlm->purge_list);
        INIT_LIST_HEAD(&dlm->dlm_domain_handlers);
index 6bd690b5a0613b8dc65143bdbd036968b592c8f3..52cfe99ae0565f20295139f543cf2a3d490eeeb2 100644 (file)
@@ -2544,11 +2544,6 @@ int ocfs2_super_lock(struct ocfs2_super *osb,
         * refreshed, so we do it here. Of course, making sense of
         * everything is up to the caller :) */
        status = ocfs2_should_refresh_lock_res(lockres);
-       if (status < 0) {
-               ocfs2_cluster_unlock(osb, lockres, level);
-               mlog_errno(status);
-               goto bail;
-       }
        if (status) {
                status = ocfs2_refresh_slot_info(osb);