diff options
author | Coly Li <colyli@suse.de> | 2019-11-13 11:03:20 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-11-14 01:42:50 +0300 |
commit | 06c1526da97dd0022973de3fc41b79b2d431b435 (patch) | |
tree | b965276c7b36e454d278d1fe4af3dca060237201 /drivers/md | |
parent | 41fa4deef90ba1cd048b740317f50b9decae9fc8 (diff) | |
download | linux-06c1526da97dd0022973de3fc41b79b2d431b435.tar.xz |
bcache: add code comment bch_keylist_pop() and bch_keylist_pop_front()
This patch adds simple code comments for bch_keylist_pop() and
bch_keylist_pop_front() in bset.c, to make the code more easier to
be understand.
Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/bcache/bset.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/bcache/bset.c b/drivers/md/bcache/bset.c index 08768796b543..f37a429f093d 100644 --- a/drivers/md/bcache/bset.c +++ b/drivers/md/bcache/bset.c @@ -155,6 +155,7 @@ int __bch_keylist_realloc(struct keylist *l, unsigned int u64s) return 0; } +/* Pop the top key of keylist by pointing l->top to its previous key */ struct bkey *bch_keylist_pop(struct keylist *l) { struct bkey *k = l->keys; @@ -168,6 +169,7 @@ struct bkey *bch_keylist_pop(struct keylist *l) return l->top = k; } +/* Pop the bottom key of keylist and update l->top_p */ void bch_keylist_pop_front(struct keylist *l) { l->top_p -= bkey_u64s(l->keys); |