[lustre-devel] [PATCH 17/30] lustre: llite: protect ll_dentry_data modification
James Simmons
jsimmons at infradead.org
Mon Sep 17 10:30:27 PDT 2018
From: Andriy Skulysh <c17819 at cray.com>
The ll_dentry_data bitfields modification should be protected by
a spinlock.
Signed-off-by: Andriy Skulysh <c17819 at cray.com>
Signed-off-by: Lai Siyao <lai.siyao at whamcloud.com>
WC-bug-id: https://jira.whamcloud.com/browse/LU-9241
Seagate-bug-id: MRP-4257
Reviewed-on: https://review.whamcloud.com/26109
Reviewed-by: Niu Yawei <yawei.niu at intel.com>
Reviewed-by: Bobi Jam <bobijam at hotmail.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
drivers/staging/lustre/lustre/llite/llite_nfs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/lustre/lustre/llite/llite_nfs.c b/drivers/staging/lustre/lustre/llite/llite_nfs.c
index c66072a..5e91e83 100644
--- a/drivers/staging/lustre/lustre/llite/llite_nfs.c
+++ b/drivers/staging/lustre/lustre/llite/llite_nfs.c
@@ -171,8 +171,9 @@ struct lustre_nfs_fid {
* we came from NFS and so opencache needs to be
* enabled for this one
*/
+ spin_lock(&result->d_lock);
ll_d2d(result)->lld_nfs_dentry = 1;
-
+ spin_unlock(&result->d_lock);
return result;
}
--
1.8.3.1
More information about the lustre-devel
mailing list