summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-02-07 10:58:51 +0200
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-02-29 16:10:20 +0200
commitc43be1085f8480ab36d5c8c76a08e67bdf6d2e18 (patch)
tree5d77b528c065e6d5c542c631634cd440ae3938ac /Makefile
parentb06283c7df35b5a49ab141ed38e0280821379096 (diff)
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>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions