block: partition: use RCU_INIT_POINTER() for NULLing.
PATCH 1/1 block: partition: use RCU_INIT_POINTER() for NULLing.
It is safe to use RCU_INIT_POINTER() to NULL, instead of rcu_assign_pointer().
This results in slightly smaller/faster code.
--- block/partition-generic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
block/partition-generic.c +2 -2
@@ -262,8 +262,8 @@ void delete_partition(struct gendisk *disk, int partno)if (!part)return ; -rcu_assign_pointer (ptbl->part[partno],NULL ); -rcu_assign_pointer (ptbl->last_lookup,NULL ); +RCU_INIT_POINTER (ptbl->part[partno],NULL ); +RCU_INIT_POINTER (ptbl->last_lookup,NULL );kobject_put (part->holder_dir);device_del (part_to_dev (part));
Signature · 1 line
1.9.1
Quoted 5 lines · Muhammad Falak R Wani
It is safe to use
RCU_INIT_POINTER()to NULL, instead ofrcu_assign_pointer().
This results in slightly smaller/faster code.Signed-off-by Muhammad Falak R Wani <[email protected]>
Muhammad,
please stop sending these patches. They make the code less reusbale, and we (or rather Paul) are working on making rcu_assign_pointer do the right thing.
Quoted 5 lines · Christoph Hellwig
Quoted 4 lines · Muhammad Falak R Wani
It is safe to use
RCU_INIT_POINTER()to NULL, instead ofrcu_assign_pointer().
This results in slightly smaller/faster code.
Quoted 7 lines
Quoted 1 line
Signed-off-by Muhammad Falak R Wani <[email protected]>Muhammad,
please stop sending these patches. They make the code less reusbale, and we (or rather Paul) are working on making
rcu_assign_pointerdo the right thing.
Sorry, my bad!
Wont send any of these now. I just thought it might be the right thing to do, till the time Paul et al make it do the right thing.
-mfrw