During the review it was pointed out why the RCU lock was dropped
in lu_env_remove() but the code itself doesn't explain why. Add
a comment giving the details why RCU locking is not needed.
Test-parameters: trivial
Lustre-change: https://review.whamcloud.com/35447
Lustre-commit:
709fbe6ee54aa2e601237a6981db3d42a8a719cd
Change-Id: I4fd761d2e1b4adad8e970904d56cdcd057dfe7d5
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Neil Brown <neilb@suse.com>
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/35488
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
}
}
+ /* The rcu_lock is not taking in this case since the key
+ * used is the actual task_struct. This implies that each
+ * object is only removed by the owning thread, so there
+ * can never be a race on a particular object.
+ */
lei = rhashtable_lookup_fast(&lu_env_rhash, &task,
lu_env_rhash_params);
if (lei && rhashtable_remove_fast(&lu_env_rhash, &lei->lei_linkage,