]> git.baikalelectronics.ru Git - kernel.git/commit
vfs: count unlinked inodes
authorMiklos Szeredi <mszeredi@suse.cz>
Mon, 21 Nov 2011 11:11:32 +0000 (12:11 +0100)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 7 Jan 2012 04:20:12 +0000 (23:20 -0500)
commit92005af5403d51a6c1dd05c54802b8e00c760e04
treeed1228f0bfa9d0050d746933595004d7c6e940f9
parent2fef26398d17016c687b2eaddf9e5e4720a46fd9
vfs: count unlinked inodes

Add a new counter to the superblock that keeps track of unlinked but
not yet deleted inodes.

Do not WARN_ON if set_nlink is called with zero count, just do a
ratelimited printk.  This happens on xfs and probably other
filesystems after an unclean shutdown when the filesystem reads inodes
which already have zero i_nlink.  Reported by Christoph Hellwig.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Tested-by: Toshiyuki Okajima <toshi.okajima@jp.fujitsu.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/inode.c
include/linux/fs.h