All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shuning Zhang <sunny.s.zhang@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH V2 2/2] ocfs2: remove unused function ocfs2_prepare_inode_for_refcount
Date: Wed, 18 Sep 2019 10:02:55 +0800	[thread overview]
Message-ID: <1568772175-2906-3-git-send-email-sunny.s.zhang@oracle.com> (raw)
In-Reply-To: <1568772175-2906-1-git-send-email-sunny.s.zhang@oracle.com>

The function of ocfs2_prepare_inode_for_refcount is no longer
being used. I remove this function.

Signed-off-by: Shuning Zhang <sunny.s.zhang@oracle.com>
---
 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,
-- 
2.7.4

  parent reply	other threads:[~2019-09-18  2:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-18  2:02 [Ocfs2-devel] [PATCH V2 0/2] ocfs2: protect extent tree in the ocfs2_prepare_inode_for_write Shuning Zhang
2019-09-18  2:02 ` [Ocfs2-devel] [PATCH V2 1/2] " Shuning Zhang
2019-09-20 16:57   ` Junxiao Bi
2019-09-25 10:33   ` Gang He
2019-09-27  7:15     ` sunnyZhang
     [not found]       ` <92e25022-9d63-92f5-d3cf-08423c5c97b7@oracle.com>
2019-10-24  2:02         ` Gang He
2019-10-24  4:34           ` sunnyZhang
2019-10-25  0:06             ` Andrew Morton
2019-10-25  0:52               ` sunnyZhang
2019-09-18  2:02 ` Shuning Zhang [this message]
2019-09-20 16:57   ` [Ocfs2-devel] [PATCH V2 2/2] ocfs2: remove unused function ocfs2_prepare_inode_for_refcount Junxiao Bi
2019-09-25 10:34   ` Gang He

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1568772175-2906-3-git-send-email-sunny.s.zhang@oracle.com \
    --to=sunny.s.zhang@oracle.com \
    --cc=ocfs2-devel@oss.oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.