aboutsummaryrefslogtreecommitdiffstats
path: root/fs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/inode.c')
-rw-r--r--fs/inode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/inode.c b/fs/inode.c
index 00d5fc3b86e1..d6dfb09c8280 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -333,8 +333,10 @@ EXPORT_SYMBOL(set_nlink);
333 */ 333 */
334void inc_nlink(struct inode *inode) 334void inc_nlink(struct inode *inode)
335{ 335{
336 if (WARN_ON(inode->i_nlink == 0)) 336 if (unlikely(inode->i_nlink == 0)) {
337 WARN_ON(!(inode->i_state & I_LINKABLE));
337 atomic_long_dec(&inode->i_sb->s_remove_count); 338 atomic_long_dec(&inode->i_sb->s_remove_count);
339 }
338 340
339 inode->__i_nlink++; 341 inode->__i_nlink++;
340} 342}