openwrtv4/target/linux/generic
Jing Qiu 4475da968a kernel: Fix the incorrect i_nlink count after jffs2's RENAME_EXCHANGE operations.
The problem is caused by the incorrect handling of the parent inode's
i_nlink count for the dentry to be RENAME_EXCHANGED. There are 3 cases
to consider. Assume we want to RENAME_EXCHANGE struct dentry *a and
struct dentry *b, and inode_a is pointed to by dentry_a, inode_b is
pointed to by dentry_b:

1. If inode_a is a directory, but inode_b isn't, then we must decrease
   the i_nlink count of old_dir_i, and increase the i_nlink of new_dir_i.
2. If inode_a isn't a directory, but inode_b is a directory, then we
   must increase the i_nlink of old_dir_i, and decrease the i_nlink count
   of new_dir_i.
3. If the types of inode_a and inode_b are the same, we don't change the
   i_nlink for either old_dir_i or new_dir_i.

Signed-off-by: Jing Qiu <aqiu0720@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-03-16 11:28:40 +01:00
..
base-files update the /init file to start /sbin/init 2013-03-13 18:11:13 +00:00
files kernel: mtdsplit: Add support for Mikrotik NOR firmware 2017-02-22 22:52:19 +01:00
image treewide: replace nbd@openwrt.org with nbd@nbd.name 2016-06-07 08:58:42 +02:00
patches-3.18 kernel: fix phy aneg crash 2017-03-12 11:58:45 +01:00
patches-4.4 kernel: Fix the incorrect i_nlink count after jffs2's RENAME_EXCHANGE operations. 2017-03-16 11:28:40 +01:00
patches-4.9 kernel: Fix the incorrect i_nlink count after jffs2's RENAME_EXCHANGE operations. 2017-03-16 11:28:40 +01:00
config-3.18 kernel: add another missing TPM symbol 2017-03-11 08:27:10 +01:00
config-4.4 kernel: add another missing TPM symbol 2017-03-11 08:27:10 +01:00
config-4.9 kernel: add missing config symbols for 4.9 2017-03-14 13:28:04 +01:00
PATCHES kernel: update PATCHES with a stricter policy 2013-07-09 20:52:07 +00:00