linux/fs/ubifs
Artem Bityutskiy c43be1085f UBIFS: do not use inc_link when i_nlink is zero
This patch changes the 'i_nlink' counter handling in 'ubifs_unlink()',
'ubifs_rmdir()' and 'ubifs_rename()'. In these function  'i_nlink' may become 0,
and if 'ubifs_jnl_update()' failed, we would use 'inc_nlink()' to restore
the previous 'i_nlink' value, which is incorrect from the VFS point of view and
would cause a 'WARN_ON()' (see 'inc_nlink() implementation).

This patches saves the previous 'i_nlink' value in a local variable and uses it
at the error path instead of calling 'inc_nlink()'. We do this only for the
inodes where 'i_nlink' may potentially become zero.

This change has been requested by Al Viro <viro@ZenIV.linux.org.uk>.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-02-29 16:10:20 +02:00
..
budget.c writeback: Add a 'reason' to wb_writeback_work 2011-10-31 00:33:36 +08:00
commit.c UBIFS: lessen amount of debugging check types 2011-07-04 10:54:28 +03:00
compress.c UBIFS: fix sparse warnings 2008-12-31 14:13:24 +02:00
debug.c UBIFS: make the dbg_lock spinlock static 2012-02-29 16:10:20 +02:00
debug.h UBIFS: make the dbg_lock spinlock static 2012-02-29 16:10:20 +02:00
dir.c UBIFS: do not use inc_link when i_nlink is zero 2012-02-29 16:10:20 +02:00
file.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2011-07-22 19:02:39 -07:00
find.c UBIFS: introduce a separate structure for budgeting info 2011-05-13 19:23:53 +03:00
gc.c UBIFS: synchronize write-buffer before switching to the next bud 2011-05-16 10:31:41 +03:00
io.c UBIFS: remove custom list of superblocks 2011-07-04 10:54:33 +03:00
ioctl.c vfs: mnt_drop_write_file() 2012-01-03 22:52:40 -05:00
journal.c UBIFS: fix key printing 2012-01-13 12:50:42 +02:00
Kconfig UBIFS: do not select KALLSYMS_ALL 2011-04-05 10:45:45 +03:00
key.h UBIFS: mark unused key objects as invalid 2010-08-30 10:19:08 +03:00
log.c UBIFS: switch to I/O helpers 2011-07-04 10:54:33 +03:00
lprops.c UBIFS: introduce helper functions for debugging checks and tests 2011-07-04 10:54:28 +03:00
lpt_commit.c UBIFS: switch to ubifs_leb_read 2011-07-04 10:54:33 +03:00
lpt.c UBIFS: Use kmemdup rather than duplicating its implementation 2011-11-22 10:58:48 +02:00
Makefile
master.c UBIFS: introduce a separate structure for budgeting info 2011-05-13 19:23:53 +03:00
misc.h UBIFS: introduce more I/O helpers 2011-07-04 10:54:33 +03:00
orphan.c UBIFS: introduce helper functions for debugging checks and tests 2011-07-04 10:54:28 +03:00
recovery.c UBIFS: amend recovery debugging message 2012-02-29 16:10:20 +02:00
replay.c UBIFS: fix key printing 2012-01-13 12:50:42 +02:00
sb.c UBIFS: fix the dark space calculation 2011-08-26 16:08:39 +05:30
scan.c UBIFS: switch to ubifs_leb_read 2011-07-04 10:54:33 +03:00
shrinker.c UBIFS: fix shrinker object count reports 2011-06-03 18:12:24 +03:00
super.c vfs: switch ->show_options() to struct dentry * 2012-01-06 23:19:54 -05:00
tnc_commit.c UBIFS: lessen amount of debugging check types 2011-07-04 10:54:28 +03:00
tnc_misc.c UBIFS: fix key printing 2012-01-13 12:50:42 +02:00
tnc.c Merge branch 'linux-next' of git://git.infradead.org/ubifs-2.6 2012-01-13 10:31:33 -08:00
ubifs-media.h UBIFS: add a superblock flag for free space fix-up 2011-05-16 14:12:14 +03:00
ubifs.h ubifs: propagate umode_t 2012-01-03 22:55:06 -05:00
xattr.c UBIFS: Use kmemdup rather than duplicating its implementation 2011-11-22 10:58:48 +02:00