From patchwork Fri Jun 7 01:41:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Goldwyn Rodriues X-Patchwork-Id: 2683931 Return-Path: X-Original-To: patchwork-ocfs2-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from aserp1040.oracle.com (aserp1040.oracle.com [141.146.126.69]) by patchwork1.kernel.org (Postfix) with ESMTP id 907503FD4E for ; Fri, 7 Jun 2013 01:42:18 +0000 (UTC) Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r571ffZX013050 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 7 Jun 2013 01:41:42 GMT Received: from oss.oracle.com (oss-external.oracle.com [137.254.96.51]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r571faKJ017674 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 7 Jun 2013 01:41:36 GMT Received: from localhost ([127.0.0.1] helo=oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1UklgO-0004ik-0u; Thu, 06 Jun 2013 18:41:36 -0700 Received: from ucsinet22.oracle.com ([156.151.31.94]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1Uklfz-0004hl-F7 for ocfs2-devel@oss.oracle.com; Thu, 06 Jun 2013 18:41:11 -0700 Received: from aserp1030.oracle.com (aserp1030.oracle.com [141.146.126.68]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r571fA9G005148 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 7 Jun 2013 01:41:11 GMT Received: from mail-oa0-f50.google.com (mail-oa0-f50.google.com [209.85.219.50]) by aserp1030.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r571f94Q021210 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Fri, 7 Jun 2013 01:41:10 GMT Received: by mail-oa0-f50.google.com with SMTP id l20so2775695oag.23 for ; Thu, 06 Jun 2013 18:41:09 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.182.129.129 with SMTP id nw1mr20263374obb.100.1370569269532; Thu, 06 Jun 2013 18:41:09 -0700 (PDT) Received: by 10.182.56.232 with HTTP; Thu, 6 Jun 2013 18:41:09 -0700 (PDT) Date: Thu, 6 Jun 2013 20:41:09 -0500 Message-ID: From: Goldwyn Rodrigues To: Ocfs2-Devel X-Flow-Control-Info: class=Pass-to-MM reputation=ipRisk-All ip=209.85.219.50 ct-class=R5 ct-vol1=-97 ct-vol2=8 ct-vol3=8 ct-risk=43 ct-spam1=66 ct-spam2=6 ct-bulk=5 rcpts=1 size=1815 X-Sendmail-CM-Score: 0.00% X-Sendmail-CM-Analysis: v=2.1 cv=YtA2GeoX c=1 sm=1 tr=0 a=vwzXOsKPqX19DMMWTnMzaA==:117 a=1Ok-kUOB6acA:10 a=nDghuxUhq_wA:10 a=8nJEP1OIZ-IA:10 a=pGLkceISAAAA:8 a=1XWaLZrsAAAA:8 a=yPCof4ZbAAAA:8 a=IAXq3Wu-ujMA:10 a=iox4zFpeAAAA:8 a=N6zCCQ_oA0uu5-Fp31sA:9 a=wPNLvfG TeEIA:10 a=n9GBPR9yFnkA:10 X-Sendmail-CT-Classification: not spam X-Sendmail-CT-RefID: str=0001.0A090203.51B13A36.002B, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 Subject: [Ocfs2-devel] [PATCH] Remove unecessary variable needs_checkpoint X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Source-IP: acsinet21.oracle.com [141.146.126.237] Code cleanup: needs_checkpoint is only assigned but never used to check. Delete the variable. Signed-off-by: Goldwyn Rodrigues --- "%10s => State: %d TxnId: %lu NumTxns: %d\n", @@ -2154,7 +2153,6 @@ static int ocfs2_initialize_super(struct super_block *sb, } init_waitqueue_head(&osb->checkpoint_event); - atomic_set(&osb->needs_checkpoint, 0); osb->s_atime_quantum = OCFS2_DEFAULT_ATIME_QUANTUM; diff --git a/fs/ocfs2/journal.h b/fs/ocfs2/journal.h index a3385b6..0a99273 100644 --- a/fs/ocfs2/journal.h +++ b/fs/ocfs2/journal.h @@ -200,7 +200,6 @@ void ocfs2_complete_quota_recovery(struct ocfs2_super *osb); static inline void ocfs2_start_checkpoint(struct ocfs2_super *osb) { - atomic_set(&osb->needs_checkpoint, 1); wake_up(&osb->checkpoint_event); } diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h index d355e6e..3a90347 100644 --- a/fs/ocfs2/ocfs2.h +++ b/fs/ocfs2/ocfs2.h @@ -347,7 +347,6 @@ struct ocfs2_super struct task_struct *recovery_thread_task; int disable_recovery; wait_queue_head_t checkpoint_event; - atomic_t needs_checkpoint; struct ocfs2_journal *journal; unsigned long osb_commit_interval; diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index 01b8516..854d809 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c @@ -286,10 +286,9 @@ static int ocfs2_osb_dump(struct ocfs2_super *osb, char *buf, int len) spin_unlock(&osb->osb_lock); out += snprintf(buf + out, len - out, - "%10s => Pid: %d Interval: %lu Needs: %d\n", "Commit", + "%10s => Pid: %d Interval: %lu\n", "Commit", (osb->commit_task ? task_pid_nr(osb->commit_task) : -1), - osb->osb_commit_interval, - atomic_read(&osb->needs_checkpoint)); + osb->osb_commit_interval); out += snprintf(buf + out, len - out,