scoutfs: remove scoutfs_item_lookup_exact() size

Every caller of scoutfs_item_lookup_exact() provided a size that matches
the value buffer.  Let's remove the redundant arg and use the value
buffer length as the exact size to match.

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2018-04-04 09:15:27 -05:00
committed by Mark Swan
parent 9c1b393404
commit 08f544cc15
5 changed files with 16 additions and 27 deletions
+3 -5
View File
@@ -258,8 +258,7 @@ static int lookup_dirent(struct super_block *sb, struct inode *dir,
scoutfs_kvec_init(val, dent, sizeof(struct scoutfs_dirent));
ret = scoutfs_item_lookup_exact(sb, key, val,
sizeof(struct scoutfs_dirent), lock);
ret = scoutfs_item_lookup_exact(sb, key, val, lock);
out:
scoutfs_key_free(sb, key);
return ret;
@@ -999,8 +998,7 @@ static int symlink_item_ops(struct super_block *sb, int op, u64 ino,
if (op == SYM_CREATE)
ret = scoutfs_item_create(sb, &key, val, lock);
else if (op == SYM_LOOKUP)
ret = scoutfs_item_lookup_exact(sb, &key, val, bytes,
lock);
ret = scoutfs_item_lookup_exact(sb, &key, val, lock);
else if (op == SYM_DELETE)
ret = scoutfs_item_delete(sb, &key, lock);
if (ret)
@@ -1445,7 +1443,7 @@ static int verify_entry(struct super_block *sb, u64 dir_ino, const char *name,
scoutfs_kvec_init(val, &dent, sizeof(dent));
ret = scoutfs_item_lookup_exact(sb, key, val, sizeof(dent), lock);
ret = scoutfs_item_lookup_exact(sb, key, val, lock);
if (ret == 0 && le64_to_cpu(dent.ino) != ino)
ret = -ENOENT;
else if (ret == -ENOENT && ino == 0)