Extracted out a function called get_inode()