aboutsummaryrefslogtreecommitdiffstats
path: root/fs/orangefs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-02-13 11:16:37 -0500
committerMike Marshall <hubcap@omnibond.com>2016-02-19 13:45:54 -0500
commit178041848a6e7072cc6ebc1c6c7763e33f564722 (patch)
treefaeb03a2420885da2a825695386331aac12b5186 /fs/orangefs
parent05b39a8b5cecaaf356497ee7df2f8acbc59eb2ee (diff)
orangefs_bufmap_..._query(): don't bother with refcounts
... just hold the spinlock while fetching the field in question. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'fs/orangefs')
-rw-r--r--fs/orangefs/orangefs-bufmap.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/orangefs/orangefs-bufmap.c b/fs/orangefs/orangefs-bufmap.c
index 1819dee58433..cd484665bf72 100644
--- a/fs/orangefs/orangefs-bufmap.c
+++ b/fs/orangefs/orangefs-bufmap.c
@@ -91,11 +91,11 @@ int orangefs_bufmap_size_query(void)
91{ 91{
92 struct orangefs_bufmap *bufmap; 92 struct orangefs_bufmap *bufmap;
93 int size = 0; 93 int size = 0;
94 bufmap = orangefs_bufmap_ref(); 94 spin_lock(&orangefs_bufmap_lock);
95 if (bufmap) { 95 bufmap = __orangefs_bufmap;
96 if (bufmap)
96 size = bufmap->desc_size; 97 size = bufmap->desc_size;
97 orangefs_bufmap_unref(bufmap); 98 spin_unlock(&orangefs_bufmap_lock);
98 }
99 return size; 99 return size;
100} 100}
101 101
@@ -103,11 +103,11 @@ int orangefs_bufmap_shift_query(void)
103{ 103{
104 struct orangefs_bufmap *bufmap; 104 struct orangefs_bufmap *bufmap;
105 int shift = 0; 105 int shift = 0;
106 bufmap = orangefs_bufmap_ref(); 106 spin_lock(&orangefs_bufmap_lock);
107 if (bufmap) { 107 bufmap = __orangefs_bufmap;
108 if (bufmap)
108 shift = bufmap->desc_shift; 109 shift = bufmap->desc_shift;
109 orangefs_bufmap_unref(bufmap); 110 spin_unlock(&orangefs_bufmap_lock);
110 }
111 return shift; 111 return shift;
112} 112}
113 113