public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ext4: fix callers of ext4_handle_release_buffer() API
@ 2011-03-01 13:30 Amir Goldstein
  2011-03-21  2:43 ` Ted Ts'o
  0 siblings, 1 reply; 3+ messages in thread
From: Amir Goldstein @ 2011-03-01 13:30 UTC (permalink / raw)
  To: Theodore Tso; +Cc: Ext4 Developers List

ext4_handle_release_buffer() is an API, which is not being used properly.
This is not so bad considering that it calls jbd2_journal_release_buffer(),
which does nothing, but the snapshots implementation of this API does
something.

ext4_jbd2.h defines 2 identical wrapper functions:
ext4_journal_release_buffer() and ext4_handle_release_buffer().
The former has no callers, so it was removed.

There are 2 users of the API:
ext4_new_inode() calls ext4_handle_release_buffer() and
ext4_xattr_block_set() calls jbd2_journal_release_buffer() directly.
The latter was chagned to call the wrapper API.

Signed-off-by: Amir Goldstein <amir73il@users.sf.net>
---
 fs/ext4/ext4_jbd2.h |    7 -------
 fs/ext4/xattr.c     |    2 +-
 2 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/fs/ext4/ext4_jbd2.h b/fs/ext4/ext4_jbd2.h
index d8b992e..e25e99b 100644
--- a/fs/ext4/ext4_jbd2.h
+++ b/fs/ext4/ext4_jbd2.h
@@ -202,13 +202,6 @@ static inline int
ext4_handle_has_enough_credits(handle_t *handle, int needed)
 	return 1;
 }

-static inline void ext4_journal_release_buffer(handle_t *handle,
-						struct buffer_head *bh)
-{
-	if (ext4_handle_valid(handle))
-		jbd2_journal_release_buffer(handle, bh);
-}

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-21  4:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-01 13:30 [PATCH] ext4: fix callers of ext4_handle_release_buffer() API Amir Goldstein
2011-03-21  2:43 ` Ted Ts'o
2011-03-21  4:34   ` Amir Goldstein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox