From patchwork Fri Jun 7 11:49:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Goldwyn Rodriues X-Patchwork-Id: 2686571 Return-Path: X-Original-To: patchwork-ocfs2-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from userp1040.oracle.com (userp1040.oracle.com [156.151.31.81]) by patchwork1.kernel.org (Postfix) with ESMTP id 6A1853FC23 for ; Fri, 7 Jun 2013 11:50:30 +0000 (UTC) Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r57Bng5M011101 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 7 Jun 2013 11:49:43 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 r57BnefG016158 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 7 Jun 2013 11:49:40 GMT Received: from localhost ([127.0.0.1] helo=oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1UkvAq-0005k1-9H; Fri, 07 Jun 2013 04:49:40 -0700 Received: from acsinet21.oracle.com ([141.146.126.237]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1UkvAZ-0005je-38 for ocfs2-devel@oss.oracle.com; Fri, 07 Jun 2013 04:49:23 -0700 Received: from aserp1020.oracle.com (aserp1020.oracle.com [141.146.126.67]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r57BnMDi015677 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 7 Jun 2013 11:49:23 GMT Received: from mail-gh0-f182.google.com (mail-gh0-f182.google.com [209.85.160.182]) by aserp1020.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r57BnLYL023459 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Fri, 7 Jun 2013 11:49:22 GMT Received: by mail-gh0-f182.google.com with SMTP id z15so38668ghb.13 for ; Fri, 07 Jun 2013 04:49:21 -0700 (PDT) X-Received: by 10.236.146.8 with SMTP id q8mr28638557yhj.72.1370605761658; Fri, 07 Jun 2013 04:49:21 -0700 (PDT) Received: from shrek.cartoons (c-75-64-61-89.hsd1.tn.comcast.net. [75.64.61.89]) by mx.google.com with ESMTPSA id y24sm118522298yhn.20.2013.06.07.04.49.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 07 Jun 2013 04:49:21 -0700 (PDT) Date: Fri, 7 Jun 2013 06:49:18 -0500 From: Goldwyn Rodrigues To: ocfs2-devel@oss.oracle.com Message-ID: <20130607114918.GA3332@shrek.cartoons> Mail-Followup-To: ocfs2-devel@oss.oracle.com MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Flow-Control-Info: class=Pass-to-MM reputation=ipRisk-All ip=209.85.160.182 ct-class=R6 ct-vol1=0 ct-vol2=0 ct-vol3=0 ct-risk=68 ct-spam1=0 ct-spam2=0 ct-bulk=0 rcpts=1 size=1839 X-Sendmail-CM-Score: 0.00% X-Sendmail-CM-Analysis: v=2.1 cv=bbFSDo/B c=1 sm=1 tr=0 a=KvBZ6Xwhw5gkWaxDiVDmSg==:117 a=d9OfPU+c/iNwybyNyKUfsg==:17 a=LcaDllckn3IA:10 a=1Ok-kUOB6acA:10 a=nDghuxUhq_wA:10 a=kj9zAlcOel0A:10 a=pGLkceISAAAA:8 a=1XWaLZrsAAAA:8 a=yPCof4ZbAAAA:8 a=C_IRinGWAAAA:8 a=lS 0MHldHvS4A:10 a=IAXq3Wu-ujMA:10 a=iox4zFpeAAAA:8 a=OCSRGkM2VTI_yqDAlm8A:9 a=CjuIK1q_8ugA:10 a=n9GBPR9yFnkA:10 X-Sendmail-CT-Classification: not spam X-Sendmail-CT-RefID: str=0001.0A090209.51B1C8C2.0085, 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 --- 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, "%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;