aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/archs38/config-4.4
diff options
context:
space:
mode:
authorJing Qiu <aqiu0720@gmail.com>2017-03-14 15:32:08 +0800
committerFelix Fietkau <nbd@nbd.name>2017-03-16 11:28:40 +0100
commit4475da968a27cce66663c9a3d066b26ac18d6598 (patch)
treeb27da01d38f02b5d2addcf8f40052ae01983501a /target/linux/archs38/config-4.4
parent8b12e62e9cd6ba2e3bb2e7f2555180df0173c7c6 (diff)
downloadupstream-4475da968a27cce66663c9a3d066b26ac18d6598.tar.gz
upstream-4475da968a27cce66663c9a3d066b26ac18d6598.tar.bz2
upstream-4475da968a27cce66663c9a3d066b26ac18d6598.zip
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>
Diffstat (limited to 'target/linux/archs38/config-4.4')
0 files changed, 0 insertions, 0 deletions