Jing Qiu
638ca50f3b
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-04-05 09:57:41 +02:00
..
2016-06-07 08:58:42 +02:00
2017-04-02 14:37:49 +02:00
2016-08-23 10:51:17 +03:00
2016-07-20 13:42:42 +02:00
2017-01-31 14:45:52 +01:00
2017-04-02 14:37:49 +02:00
2016-05-19 21:08:06 +02:00
2016-05-16 19:54:50 +02:00
2016-05-16 19:54:50 +02:00
2016-06-11 09:51:23 +02:00
2017-01-10 15:37:21 +01:00
2017-01-10 15:37:21 +01:00
2017-01-10 15:37:22 +01:00
2016-07-20 13:42:42 +02:00
2016-07-20 13:00:14 +02:00
2016-11-08 11:36:39 +01:00
2016-11-28 13:15:13 +01:00
2017-02-22 19:01:50 +01:00
2017-02-22 19:01:50 +01:00
2017-02-22 19:02:51 +01:00
2017-02-22 19:02:51 +01:00
2016-09-03 09:27:09 +02:00
2016-05-10 10:43:17 +02:00
2016-08-23 10:51:17 +03:00
2016-08-23 10:51:17 +03:00
2017-01-06 19:38:55 +01:00
2016-09-06 21:37:49 +02:00
2016-11-16 10:54:33 +01:00
2016-09-06 21:37:49 +02:00
2016-11-16 10:54:33 +01:00
2016-11-16 10:54:33 +01:00
2016-11-16 10:54:33 +01:00
2016-09-19 14:27:26 +02:00
2016-12-13 09:40:46 +01:00
2016-12-13 09:40:46 +01:00
2016-09-08 15:28:38 +02:00
2017-01-15 18:25:54 +01:00
2017-04-02 14:37:49 +02:00
2017-01-15 18:25:54 +01:00
2017-01-15 18:25:54 +01:00
2017-01-15 18:25:54 +01:00
2017-02-12 12:25:52 +01:00
2017-02-05 22:38:26 +01:00
2017-02-05 22:38:26 +01:00
2017-02-05 22:38:26 +01:00
2017-02-05 22:38:26 +01:00
2017-02-05 22:38:26 +01:00
2017-02-05 22:38:26 +01:00
2017-02-05 22:38:26 +01:00
2017-02-05 22:38:26 +01:00
2017-02-05 22:38:26 +01:00
2017-02-05 22:38:26 +01:00
2017-02-05 22:38:26 +01:00
2017-02-05 22:38:26 +01:00
2017-02-05 22:38:26 +01:00
2017-02-05 22:38:26 +01:00
2017-02-05 22:38:26 +01:00
2017-02-05 22:38:26 +01:00
2017-02-05 22:38:26 +01:00
2017-02-05 22:38:26 +01:00
2017-02-05 22:38:26 +01:00
2017-02-05 22:38:26 +01:00
2017-02-05 22:38:26 +01:00
2017-02-05 22:38:26 +01:00
2017-02-05 22:38:26 +01:00
2017-02-05 22:38:26 +01:00
2017-02-05 22:38:26 +01:00
2017-02-05 22:38:26 +01:00
2017-02-05 22:38:26 +01:00
2017-02-20 16:02:54 +01:00
2017-02-05 22:38:26 +01:00
2017-02-05 22:38:26 +01:00
2017-02-05 22:38:26 +01:00
2017-01-28 19:12:46 +01:00
2017-02-01 21:12:33 +01:00
2016-04-26 09:23:12 +00:00
2016-05-10 10:43:17 +02:00
2016-08-24 08:47:21 +02:00
2016-08-24 08:47:21 +02:00
2016-08-26 16:37:59 +02:00
2016-08-26 16:37:59 +02:00
2016-12-06 19:50:20 +01:00
2016-12-06 19:50:20 +01:00
2016-12-06 19:50:20 +01:00
2016-06-15 14:36:47 +02:00
2016-06-15 14:36:47 +02:00
2017-01-15 18:25:54 +01:00
2016-09-12 22:36:55 +02:00
2017-01-11 10:05:08 +01:00
2016-08-23 10:51:17 +03:00
2016-10-24 22:52:44 +02:00
2017-01-02 19:16:54 +01:00
2016-06-12 15:51:54 +02:00
2016-12-04 11:41:50 +01:00
2016-12-04 11:41:50 +01:00
2017-01-06 19:38:55 +01:00
2017-01-05 11:09:13 +01:00
2016-06-07 08:58:42 +02:00
2017-04-05 09:57:41 +02:00
2017-04-02 14:37:49 +02:00
2017-01-15 18:25:54 +01:00
2017-01-03 19:58:00 +01:00
2016-09-12 22:36:55 +02:00
2017-01-15 23:10:54 +01:00
2016-11-29 21:12:08 +01:00
2016-11-29 21:12:08 +01:00
2016-08-23 10:51:17 +03:00
2016-06-12 15:51:54 +02:00
2016-10-31 16:33:53 +01:00
2016-04-16 21:05:48 +00:00
2016-09-29 11:23:27 +02:00
2016-08-23 10:51:17 +03:00
2016-08-23 10:51:17 +03:00
2016-06-15 14:36:47 +02:00
2016-03-05 17:51:37 +00:00
2016-08-03 19:16:32 +02:00
2016-06-26 18:20:37 +02:00
2016-05-19 21:08:06 +02:00
2016-09-30 20:08:21 +02:00
2017-01-15 18:25:54 +01:00
2017-01-15 18:25:54 +01:00
2017-01-15 18:25:54 +01:00
2017-02-15 13:23:58 +01:00
2016-06-07 08:58:42 +02:00
2016-08-04 22:53:01 +02:00
2016-06-26 18:20:37 +02:00
2016-01-26 11:30:45 +00:00
2016-08-23 10:51:17 +03:00
2016-04-16 21:05:48 +00:00
2015-12-04 09:33:08 +00:00
2015-12-04 09:33:08 +00:00
2015-12-04 09:33:08 +00:00
2015-12-04 09:33:08 +00:00
2015-12-04 09:33:08 +00:00
2015-12-04 09:33:08 +00:00
2017-01-11 09:54:47 +01:00
2017-01-11 09:54:47 +01:00
2017-01-03 19:58:00 +01:00
2017-01-03 19:58:00 +01:00
2017-01-03 19:58:00 +01:00
2017-01-03 19:58:00 +01:00
2017-01-06 19:38:55 +01:00
2016-01-11 20:13:17 +00:00
2016-08-23 10:51:17 +03:00
2016-06-27 08:10:36 +02:00
2016-06-02 15:34:34 +02:00
2016-05-16 15:49:25 +02:00
2016-03-05 17:51:37 +00:00
2016-06-26 18:20:37 +02:00
2016-03-17 21:41:07 +00:00
2016-06-26 18:20:37 +02:00
2017-04-02 14:37:49 +02:00
2017-04-02 14:37:49 +02:00
2017-04-02 14:37:49 +02:00
2017-04-02 14:37:49 +02:00
2016-11-16 17:31:29 +01:00
2016-03-05 17:51:37 +00:00
2017-04-02 14:37:49 +02:00
2016-08-23 10:51:17 +03:00
2016-06-11 09:51:23 +02:00
2016-06-11 09:51:23 +02:00
2016-06-11 09:51:23 +02:00
2016-05-19 21:08:06 +02:00
2017-02-20 16:02:54 +01:00
2017-02-06 20:13:06 +01:00
2017-04-02 14:37:49 +02:00
2016-06-07 08:58:42 +02:00
2016-01-01 22:02:47 +00:00
2017-04-02 14:37:49 +02:00
2016-06-20 08:00:14 +02:00
2016-01-03 23:13:11 +00:00
2016-01-12 20:50:41 +00:00
2016-12-04 11:41:49 +01:00
2016-12-04 11:41:49 +01:00
2016-12-04 12:31:30 +01:00
2016-12-04 11:41:50 +01:00
2017-02-05 22:38:26 +01:00
2016-09-15 08:10:55 +02:00
2017-04-02 14:37:49 +02:00
2016-11-21 10:00:49 +01:00
2016-08-04 20:53:02 +02:00
2016-08-23 10:51:17 +03:00
2016-09-30 13:34:04 +02:00
2016-08-04 23:10:15 +02:00
2016-08-29 10:33:45 +02:00
2017-04-02 14:37:49 +02:00
2017-04-02 14:37:49 +02:00
2016-10-23 14:56:09 +02:00
2016-09-30 13:34:04 +02:00
2016-08-15 13:21:01 +02:00
2016-06-15 14:36:47 +02:00