From patchwork Wed Sep 18 02:02:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sunnyZhang X-Patchwork-Id: 11149571 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F0AC516B1 for ; Wed, 18 Sep 2019 02:08:20 +0000 (UTC) Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AECD3214AF for ; Wed, 18 Sep 2019 02:08:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="l1Vkngiq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AECD3214AF Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x8I23x06090550; Wed, 18 Sep 2019 02:08:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : date : message-id : in-reply-to : references : subject : list-id : list-unsubscribe : list-archive : list-post : list-help : list-subscribe : mime-version : content-type : content-transfer-encoding : sender; s=corp-2019-08-05; bh=8Mv3ocabMbIeL9NT/ql5z9rV5vLM/UFdUHHpbPBQuXs=; b=l1Vkngiqs/q+7nOXJSWcbp5iD27WumB3xHqidnlmG666Jo3p07p34Ivp0d7d1FmjmmYY /JY+XBrwMJI4nJuVK+SIqXaoU/Nn1BuZT7kFTycaZ78TSao7lttL5ZuZNQWkDZBbDz4q F3yw7oS1EhR9BoPUMTSU/HzzbAr3mqdJ+xKtIKcA08YXCBq+qJh1SXY3fRAKu2xFG8K2 28vNrF3pO5zjBy1G7lISSZGGazG2rlmiNqMLuBDLXUz5ZzM995AuvCnEentyeBvpjhpD BYkhb0d5uCudlqh/sfH0uwVpbTyGSJ0rGPEan9VRbPStRqLP/yJt2iZNXcVO7NeY6t6i tQ== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 2v385drkd2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 18 Sep 2019 02:08:03 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x8I24C8U053988; Wed, 18 Sep 2019 02:08:03 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3030.oracle.com with ESMTP id 2v37mkte9g-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Wed, 18 Sep 2019 02:08:03 +0000 Received: from localhost ([127.0.0.1] helo=lb-oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1iAPKv-0003nM-CH; Tue, 17 Sep 2019 19:04:53 -0700 Received: from aserp3020.oracle.com ([141.146.126.70]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1iAPK2-0003l3-M7 for ocfs2-devel@oss.oracle.com; Tue, 17 Sep 2019 19:03:58 -0700 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x8I23wiO021323 for ; Wed, 18 Sep 2019 02:03:58 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3020.oracle.com with ESMTP id 2v37mkqf4q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 18 Sep 2019 02:03:58 +0000 Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x8I23EkD013851 for ; Wed, 18 Sep 2019 02:03:14 GMT Received: from ol6u9ext3.cn.oracle.com (/10.182.71.225) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 17 Sep 2019 19:03:14 -0700 From: Shuning Zhang To: ocfs2-devel@oss.oracle.com Date: Wed, 18 Sep 2019 10:02:55 +0800 Message-Id: <1568772175-2906-3-git-send-email-sunny.s.zhang@oracle.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1568772175-2906-1-git-send-email-sunny.s.zhang@oracle.com> References: <1568772175-2906-1-git-send-email-sunny.s.zhang@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9383 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=983 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1909180019 Subject: [Ocfs2-devel] [PATCH V2 2/2] ocfs2: remove unused function ocfs2_prepare_inode_for_refcount 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: , MIME-Version: 1.0 Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9383 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1909180019 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9383 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1909180019 The function of ocfs2_prepare_inode_for_refcount is no longer being used. I remove this function. Signed-off-by: Shuning Zhang Reviewed-by: Junxiao Bi Reviewed-by: Gang He --- fs/ocfs2/file.c | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index dff4ab2..dadc35a 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -2092,33 +2092,6 @@ static int ocfs2_is_io_unaligned(struct inode *inode, size_t count, loff_t pos) return 0; } -static int ocfs2_prepare_inode_for_refcount(struct inode *inode, - struct file *file, - loff_t pos, size_t count, - int *meta_level) -{ - int ret; - struct buffer_head *di_bh = NULL; - u32 cpos = pos >> OCFS2_SB(inode->i_sb)->s_clustersize_bits; - u32 clusters = - ocfs2_clusters_for_bytes(inode->i_sb, pos + count) - cpos; - - ret = ocfs2_inode_lock(inode, &di_bh, 1); - if (ret) { - mlog_errno(ret); - goto out; - } - - *meta_level = 1; - - ret = ocfs2_refcount_cow(inode, di_bh, cpos, clusters, UINT_MAX); - if (ret) - mlog_errno(ret); -out: - brelse(di_bh); - return ret; -} - static int ocfs2_inode_lock_for_extent_tree(struct inode *inode, struct buffer_head **di_bh, int meta_level,