We hold references on inodes when the InoIdx block is pinned.
This is needed for cleaning to make sure the inode doesn't disappear.
But we also need the superblock to be held in this context.
So use lafs_igrab_fs
Signed-off-by: NeilBrown <neilb@suse.de>
if (ino->i_nlink == 0) {
/* I_Pinned should not be set */
if (test_and_clear_bit(I_Pinned, &LAFSI(ino)->iflags))
- iput(ino);
+ lafs_iput_fs(ino);
} else {
/* Need to check if iblock is Pinned. */
struct indexblock *ib = NULL;
}
if (ib) {
if (!test_and_set_bit(I_Pinned, &LAFSI(ino)->iflags))
- igrab(ino);
+ lafs_igrab_fs(ino);
} else {
if (test_and_clear_bit(I_Pinned, &LAFSI(ino)->iflags))
- iput(ino);
+ lafs_iput_fs(ino);
}
}
}
#define I_Destroyed 4 /* inode destroy has been delayed */
#define I_Trunc 5 /* a truncation is in process */
#define I_Pinned 6 /* InoIdx is pinned, i_nlink is non-zero, and consequently
- * we own an extra ref to the inode.
+ * we own an extra ref to the inode and superblock.
*/
/* next three indicate if we hold a reference on the relevant qent */
#define I_QUid 8