diff options
author | Eric Biggers <ebiggers@google.com> | 2016-12-03 15:55:01 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2016-12-03 15:55:01 -0500 |
commit | b649668c0bb3f54523cd932490a3f637859fdeb0 (patch) | |
tree | 6a6520043604f036ef9b56c3965ba8e350e1eb69 | |
parent | 132d4e2d55dfd9edae26cb35f088add7c19990e6 (diff) |
mbcache: document that "find" functions only return reusable entries
mb_cache_entry_find_first() and mb_cache_entry_find_next() only return
cache entries with the 'e_reusable' bit set. This should be documented.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
-rw-r--r-- | fs/mbcache.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/mbcache.c b/fs/mbcache.c index bf659061a9a8..b19be429d655 100644 --- a/fs/mbcache.c +++ b/fs/mbcache.c | |||
@@ -155,12 +155,12 @@ out: | |||
155 | } | 155 | } |
156 | 156 | ||
157 | /* | 157 | /* |
158 | * mb_cache_entry_find_first - find the first entry in cache with given key | 158 | * mb_cache_entry_find_first - find the first reusable entry with the given key |
159 | * @cache: cache where we should search | 159 | * @cache: cache where we should search |
160 | * @key: key to look for | 160 | * @key: key to look for |
161 | * | 161 | * |
162 | * Search in @cache for entry with key @key. Grabs reference to the first | 162 | * Search in @cache for a reusable entry with key @key. Grabs reference to the |
163 | * entry found and returns the entry. | 163 | * first reusable entry found and returns the entry. |
164 | */ | 164 | */ |
165 | struct mb_cache_entry *mb_cache_entry_find_first(struct mb_cache *cache, | 165 | struct mb_cache_entry *mb_cache_entry_find_first(struct mb_cache *cache, |
166 | u32 key) | 166 | u32 key) |
@@ -170,14 +170,14 @@ struct mb_cache_entry *mb_cache_entry_find_first(struct mb_cache *cache, | |||
170 | EXPORT_SYMBOL(mb_cache_entry_find_first); | 170 | EXPORT_SYMBOL(mb_cache_entry_find_first); |
171 | 171 | ||
172 | /* | 172 | /* |
173 | * mb_cache_entry_find_next - find next entry in cache with the same | 173 | * mb_cache_entry_find_next - find next reusable entry with the same key |
174 | * @cache: cache where we should search | 174 | * @cache: cache where we should search |
175 | * @entry: entry to start search from | 175 | * @entry: entry to start search from |
176 | * | 176 | * |
177 | * Finds next entry in the hash chain which has the same key as @entry. | 177 | * Finds next reusable entry in the hash chain which has the same key as @entry. |
178 | * If @entry is unhashed (which can happen when deletion of entry races | 178 | * If @entry is unhashed (which can happen when deletion of entry races with the |
179 | * with the search), finds the first entry in the hash chain. The function | 179 | * search), finds the first reusable entry in the hash chain. The function drops |
180 | * drops reference to @entry and returns with a reference to the found entry. | 180 | * reference to @entry and returns with a reference to the found entry. |
181 | */ | 181 | */ |
182 | struct mb_cache_entry *mb_cache_entry_find_next(struct mb_cache *cache, | 182 | struct mb_cache_entry *mb_cache_entry_find_next(struct mb_cache *cache, |
183 | struct mb_cache_entry *entry) | 183 | struct mb_cache_entry *entry) |