diff --git a/inode.c b/inode.c index ce7b585..4d9af5e 100644 --- a/inode.c +++ b/inode.c @@ -658,7 +658,8 @@ static int simplefs_unlink(struct inode *dir, struct dentry *dentry) mark_inode_dirty(inode); /* Free inode and index block from bitmap */ - put_blocks(sbi, bno, 1); + if (S_ISLNK(inode->i_mode)) + put_blocks(sbi, bno, 1); put_inode(sbi, ino); return ret;