scoutfs: add full lock coverage to _item_dirty()

Add the full lock argument to _item_dirty() so that it can verify lock
coverage in addition to limiting item cache population to the range
covered by the lock.

This also ropes in scoutfs_dirty_inode_item() which is a thin wrapper
around _item_dirty();

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2017-10-09 15:31:29 -07:00
committed by Mark Fasheh
parent 1c6e3e39bf
commit 32a68e84cf
7 changed files with 20 additions and 17 deletions
+2 -2
View File
@@ -498,7 +498,7 @@ static void store_inode(struct scoutfs_inode *cinode, struct inode *inode)
*
* XXX this will have to do something about variable length inodes
*/
int scoutfs_dirty_inode_item(struct inode *inode, struct scoutfs_key_buf *end)
int scoutfs_dirty_inode_item(struct inode *inode, struct scoutfs_lock *lock)
{
struct super_block *sb = inode->i_sb;
struct scoutfs_inode_key ikey;
@@ -510,7 +510,7 @@ int scoutfs_dirty_inode_item(struct inode *inode, struct scoutfs_key_buf *end)
scoutfs_inode_init_key(&key, &ikey, scoutfs_ino(inode));
ret = scoutfs_item_dirty(sb, &key, end);
ret = scoutfs_item_dirty(sb, &key, lock);
if (!ret)
trace_scoutfs_dirty_inode(inode);
return ret;