diff --git a/kmod/src/counters.h b/kmod/src/counters.h index ba8885ba..e12c58d7 100644 --- a/kmod/src/counters.h +++ b/kmod/src/counters.h @@ -88,6 +88,7 @@ EXPAND_COUNTER(forest_read_items) \ EXPAND_COUNTER(forest_roots_next_hint) \ EXPAND_COUNTER(forest_set_bloom_bits) \ + EXPAND_COUNTER(inode_evict_intr) \ EXPAND_COUNTER(item_clear_dirty) \ EXPAND_COUNTER(item_create) \ EXPAND_COUNTER(item_delete) \ diff --git a/kmod/src/inode.c b/kmod/src/inode.c index 427ceba3..3911b74e 100644 --- a/kmod/src/inode.c +++ b/kmod/src/inode.c @@ -1593,9 +1593,15 @@ void scoutfs_evict_inode(struct inode *inode) scoutfs_unlock(sb, lock, SCOUTFS_LOCK_WRITE); scoutfs_unlock(sb, orph_lock, SCOUTFS_LOCK_WRITE_ONLY); } - if (ret < 0) + if (ret == -ERESTARTSYS) { + /* can be in task with pending, could be found as orphan */ + scoutfs_inc_counter(sb, inode_evict_intr); + ret = 0; + } + if (ret < 0) { scoutfs_err(sb, "error %d while checking to delete inode nr %llu, it might linger.", ret, ino); + } scoutfs_omap_dec(sb, ino);