From 1fd159bed1be9ef44ed0e9c77615cd3f11de4c04 Mon Sep 17 00:00:00 2001 From: Changpeng Liu Date: Thu, 9 Apr 2020 21:42:22 -0400 Subject: [PATCH] blobfs: remove the unnecessary file lock when freeing request The channel lock is in free_fs_request(). Change-Id: Ibdb7173a24246463ff4bcff74c58c1f3c7ad7c77 Signed-off-by: Changpeng Liu Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1792 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto --- lib/blobfs/blobfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/blobfs/blobfs.c b/lib/blobfs/blobfs.c index d98d09cd5..eba5e013f 100644 --- a/lib/blobfs/blobfs.c +++ b/lib/blobfs/blobfs.c @@ -2227,10 +2227,8 @@ __file_cache_finish_sync(void *ctx, int bserrno) pthread_spin_unlock(&file->lock); sync_args->fn.file_op(sync_args->arg, bserrno); - pthread_spin_lock(&file->lock); - free_fs_request(sync_req); - pthread_spin_unlock(&file->lock); + free_fs_request(sync_req); __check_sync_reqs(file); }