1 mbcache: document that "find" functions only return reusable entries
3 From: Eric Biggers <ebiggers@google.com>
5 mb_cache_entry_find_first() and mb_cache_entry_find_next() only return
6 cache entries with the 'e_reusable' bit set. This should be documented.
8 Signed-off-by: Eric Biggers <ebiggers@google.com>
9 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
10 Reviewed-by: Jan Kara <jack@suse.cz>
12 fs/mbcache.c | 16 ++++++++--------
13 1 file changed, 8 insertions(+), 8 deletions(-)
15 diff --git a/fs/mbcache.c b/fs/mbcache.c
16 index bf65906..b19be42 100644
19 @@ -155,12 +155,12 @@ static struct mb_cache_entry *__entry_find(struct mb_cache *cache,
23 - * mb_cache_entry_find_first - find the first entry in cache with given key
24 + * mb_cache_entry_find_first - find the first reusable entry with the given key
25 * @cache: cache where we should search
26 * @key: key to look for
28 - * Search in @cache for entry with key @key. Grabs reference to the first
29 - * entry found and returns the entry.
30 + * Search in @cache for a reusable entry with key @key. Grabs reference to the
31 + * first reusable entry found and returns the entry.
33 struct mb_cache_entry *mb_cache_entry_find_first(struct mb_cache *cache,
35 @@ -170,14 +170,14 @@ struct mb_cache_entry *mb_cache_entry_find_first(struct mb_cache *cache,
36 EXPORT_SYMBOL(mb_cache_entry_find_first);
39 - * mb_cache_entry_find_next - find next entry in cache with the same
40 + * mb_cache_entry_find_next - find next reusable entry with the same key
41 * @cache: cache where we should search
42 * @entry: entry to start search from
44 - * Finds next entry in the hash chain which has the same key as @entry.
45 - * If @entry is unhashed (which can happen when deletion of entry races
46 - * with the search), finds the first entry in the hash chain. The function
47 - * drops reference to @entry and returns with a reference to the found entry.
48 + * Finds next reusable entry in the hash chain which has the same key as @entry.
49 + * If @entry is unhashed (which can happen when deletion of entry races with the
50 + * search), finds the first reusable entry in the hash chain. The function drops
51 + * reference to @entry and returns with a reference to the found entry.
53 struct mb_cache_entry *mb_cache_entry_find_next(struct mb_cache *cache,
54 struct mb_cache_entry *entry)
56 2.8.0.rc3.226.g39d4020
59 To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
60 the body of a message to majordomo@vger.kernel.org
61 More majordomo info at http://vger.kernel.org/majordomo-info.html