Filipe Manana
1c167b87f4
btrfs: remove unnecessary NULL check for the new inode during rename exchange
...
At the very end of btrfs_rename_exchange(), in case an error happened, we
are checking if 'new_inode' is NULL, but that is not needed since during a
rename exchange, unlike regular renames, 'new_inode' can never be NULL,
and if it were, we would have a crashed much earlier when we dereference it
multiple times.
So remove the check because it is not necessary and because it is causing
static checkers to emit a warning. I probably introduced the check by
copy-pasting similar code from btrfs_rename(), where 'new_inode' can be
NULL, in commit 86e8aa0e77 ("Btrfs: unpin logs if rename exchange
operation fails").
Reported-by: kernel test robot <lkp@intel.com >
Reported-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Filipe Manana <fdmanana@suse.com >
Reviewed-by: David Sterba <dsterba@suse.com >
Signed-off-by: David Sterba <dsterba@suse.com >
2021-08-23 13:19:10 +02:00
..
2021-08-23 13:19:01 +02:00
2021-01-24 14:27:20 +01:00
2020-03-23 17:01:51 +01:00
2020-03-23 17:01:51 +01:00
2021-08-23 13:19:01 +02:00
2021-08-23 13:19:01 +02:00
2021-08-23 13:19:00 +02:00
2021-07-07 17:42:41 +02:00
2020-12-08 15:53:41 +01:00
2020-03-23 17:01:55 +01:00
2021-08-23 13:19:09 +02:00
2021-08-23 13:19:00 +02:00
2020-03-23 17:01:39 +01:00
2021-08-23 13:19:04 +02:00
2021-08-23 13:19:04 +02:00
2021-08-23 13:19:09 +02:00
2021-08-23 13:19:09 +02:00
2021-06-22 14:11:57 +02:00
2020-07-27 12:55:36 +02:00
2021-08-23 13:19:09 +02:00
2020-12-08 15:54:10 +01:00
2021-07-22 15:50:07 +02:00
2021-02-08 22:58:56 +01:00
2021-06-22 14:11:57 +02:00
2021-02-09 02:46:07 +01:00
2021-08-23 13:19:02 +02:00
2021-06-22 14:11:57 +02:00
2020-12-08 15:54:02 +01:00
2021-08-23 13:19:06 +02:00
2021-02-09 02:46:07 +01:00
2020-12-08 15:54:02 +01:00
2020-03-23 17:01:42 +01:00
2021-08-23 13:19:09 +02:00
2021-08-23 13:19:08 +02:00
2021-02-08 22:58:53 +01:00
2019-11-18 23:43:44 +01:00
2020-12-08 15:54:13 +01:00
2021-08-23 13:19:00 +02:00
2021-08-23 13:19:01 +02:00
2021-08-23 13:19:09 +02:00
2021-08-23 13:19:10 +02:00
2021-02-09 02:46:03 +01:00
2021-01-25 18:44:37 +01:00
2019-11-18 17:51:51 +01:00
2020-12-08 15:54:02 +01:00
2021-08-23 13:19:10 +02:00
2021-08-23 13:19:10 +02:00
2021-06-22 14:11:57 +02:00
2021-06-22 14:11:57 +02:00
2020-12-08 15:54:09 +01:00
2021-08-23 13:19:04 +02:00
2021-08-23 13:19:09 +02:00
2020-05-25 11:25:19 +02:00
2021-08-23 13:19:02 +02:00
2021-08-23 13:19:02 +02:00
2021-01-07 17:25:05 +01:00
2021-01-07 17:25:05 +01:00
2021-06-22 14:11:58 +02:00
2019-04-29 19:02:54 +02:00
2021-08-23 13:19:01 +02:00
2021-07-22 15:50:07 +02:00
2021-08-23 13:19:03 +02:00
2019-07-01 13:34:58 +02:00
2020-03-23 17:01:53 +01:00
2021-03-16 11:06:21 +01:00
2021-08-23 13:19:00 +02:00
2021-06-21 15:19:10 +02:00
2020-03-23 17:01:54 +01:00
2021-08-23 13:19:06 +02:00
2020-10-07 12:12:13 +02:00
2021-06-22 14:11:57 +02:00
2021-08-23 13:19:10 +02:00
2020-10-07 12:13:17 +02:00
2021-08-23 13:19:07 +02:00
2021-06-22 14:55:25 +02:00
2021-08-23 13:18:58 +02:00
2021-08-23 13:19:05 +02:00
2021-08-23 13:19:04 +02:00
2021-08-23 13:19:09 +02:00
2021-08-23 13:19:09 +02:00
2020-10-07 12:12:21 +02:00
2021-07-07 17:42:41 +02:00
2021-07-07 17:42:41 +02:00
2021-08-23 13:19:09 +02:00
2020-12-08 15:54:01 +01:00
2021-08-23 13:19:09 +02:00
2020-10-07 12:06:56 +02:00
2021-04-20 19:27:17 +02:00
2021-04-19 17:25:17 +02:00
2020-12-08 15:53:52 +01:00
2021-08-23 13:19:09 +02:00
2021-08-23 13:19:09 +02:00
2021-08-23 13:19:03 +02:00
2021-03-05 12:21:14 -08:00
2021-08-23 13:19:04 +02:00
2021-08-23 13:19:01 +02:00
2021-08-23 13:18:58 +02:00
2021-08-23 13:19:04 +02:00