*/
if (ino->i_nlink == 0) {
/* I_Pinned should not be set */
- if (test_and_clear_bit(I_Pinned, &LAFSI(ino)->iflags))
- lafs_iput_fs(ino);
+ if (test_and_clear_bit(I_Pinned, &LAFSI(ino)->iflags)) {
+ if (ino->i_sb->s_type == &lafs_fs_type)
+ iput(ino);
+ else
+ lafs_iput_fs(ino);
+ }
} else {
/* Need to check if iblock is Pinned. */
struct indexblock *ib = NULL;
spin_unlock(&ino->i_data.private_lock);
}
if (ib) {
- if (!test_and_set_bit(I_Pinned, &LAFSI(ino)->iflags))
- lafs_igrab_fs(ino);
+ if (!test_and_set_bit(I_Pinned, &LAFSI(ino)->iflags)) {
+ if (ino->i_sb->s_type == &lafs_fs_type)
+ igrab(ino);
+ else
+ lafs_igrab_fs(ino);
+ }
} else {
- if (test_and_clear_bit(I_Pinned, &LAFSI(ino)->iflags))
+ if (test_and_clear_bit(I_Pinned, &LAFSI(ino)->iflags)) {
+ if (ino->i_sb->s_type == &lafs_fs_type)
+ iput(ino);
+ else
lafs_iput_fs(ino);
+ }
}
}
}