The following error would occur when use make check to test
the file system before this modification:
ls: cannot read symbolic link 'symlink': Invalid argument
Also replace inode_inc_link_count() and inode_dec_link_count()
with inc_nlink() and drop_nlink() if mark_inode_dirty() would be called
after it to avoid redundant call of mark_inode_dirty().
Set inode's link properly when unlink a file.
The following error would occur when use make check to test the file system before this modification:
ls: cannot read symbolic link 'symlink': Invalid argument
Also replace
inode_inc_link_count()
andinode_dec_link_count()
withinc_nlink()
anddrop_nlink()
ifmark_inode_dirty()
would be called after it to avoid redundant call ofmark_inode_dirty()
.