mirror of
https://github.com/versity/scoutfs.git
synced 2026-09-26 09:54:31 +00:00
scoutfs: add full lock coverage to _item_next*()
Add the full lock argument to _item_next*() so that it can verify lock coverage in addition to limiting item cache population to the range covered by the lock. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
+2
-2
@@ -379,7 +379,7 @@ static int scoutfs_readdir(struct file *file, void *dirent, filldir_t filldir)
|
||||
scoutfs_kvec_init(val, dent, item_len);
|
||||
ret = scoutfs_item_next_same_min(sb, &key, &last_key, val,
|
||||
offsetof(struct scoutfs_dirent, name[1]),
|
||||
dir_lock->end);
|
||||
dir_lock);
|
||||
if (ret < 0) {
|
||||
if (ret == -ENOENT)
|
||||
ret = 0;
|
||||
@@ -1080,7 +1080,7 @@ static int add_next_linkref(struct super_block *sb, u64 ino,
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
ret = scoutfs_item_next(sb, &key, &last, NULL, lock->end);
|
||||
ret = scoutfs_item_next(sb, &key, &last, NULL, lock);
|
||||
scoutfs_unlock(sb, lock, DLM_LOCK_PR);
|
||||
lock = NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user