aboutsummaryrefslogtreecommitdiffstats
path: root/fs/orangefs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-02-11 21:34:52 -0500
committerMike Marshall <hubcap@omnibond.com>2016-02-12 15:05:33 -0500
commit1357d06d49d1f87af48ab768d34af55bff18b0c3 (patch)
tree18b208b4117819d48d4a16f7b05bd10b94cfd407 /fs/orangefs
parentc0eae8cd77bc34b7e4c52037eeb53712f46fa05c (diff)
get rid of bufmap argument of orangefs_bufmap_put()
it's always equal to __orangefs_bufmap and the latter can't change until we are done 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/file.c6
-rw-r--r--fs/orangefs/orangefs-bufmap.c3
-rw-r--r--fs/orangefs/orangefs-bufmap.h2
3 files changed, 6 insertions, 5 deletions
diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c
index dafa03ef0107..193671c137c3 100644
--- a/fs/orangefs/file.c
+++ b/fs/orangefs/file.c
@@ -170,7 +170,7 @@ populate_shared_memory:
170 * a new shared memory location. 170 * a new shared memory location.
171 */ 171 */
172 if (ret == -EAGAIN && op_state_purged(new_op)) { 172 if (ret == -EAGAIN && op_state_purged(new_op)) {
173 orangefs_bufmap_put(bufmap, buffer_index); 173 orangefs_bufmap_put(buffer_index);
174 buffer_index = -1; 174 buffer_index = -1;
175 if (type == ORANGEFS_IO_WRITE) 175 if (type == ORANGEFS_IO_WRITE)
176 *iter = saved; 176 *iter = saved;
@@ -190,7 +190,7 @@ populate_shared_memory:
190 } else { 190 } else {
191 complete(&new_op->done); 191 complete(&new_op->done);
192 } 192 }
193 orangefs_bufmap_put(bufmap, buffer_index); 193 orangefs_bufmap_put(buffer_index);
194 buffer_index = -1; 194 buffer_index = -1;
195 /* 195 /*
196 * don't write an error to syslog on signaled operation 196 * don't write an error to syslog on signaled operation
@@ -239,7 +239,7 @@ done_copying:
239 239
240out: 240out:
241 if (buffer_index >= 0) { 241 if (buffer_index >= 0) {
242 orangefs_bufmap_put(bufmap, buffer_index); 242 orangefs_bufmap_put(buffer_index);
243 gossip_debug(GOSSIP_FILE_DEBUG, 243 gossip_debug(GOSSIP_FILE_DEBUG,
244 "%s(%pU): PUT buffer_index %d\n", 244 "%s(%pU): PUT buffer_index %d\n",
245 __func__, handle, buffer_index); 245 __func__, handle, buffer_index);
diff --git a/fs/orangefs/orangefs-bufmap.c b/fs/orangefs/orangefs-bufmap.c
index c60019de1fd8..1819dee58433 100644
--- a/fs/orangefs/orangefs-bufmap.c
+++ b/fs/orangefs/orangefs-bufmap.c
@@ -458,9 +458,10 @@ int orangefs_bufmap_get(struct orangefs_bufmap **mapp, int *buffer_index)
458 * 458 *
459 * no return value 459 * no return value
460 */ 460 */
461void orangefs_bufmap_put(struct orangefs_bufmap *bufmap, int buffer_index) 461void orangefs_bufmap_put(int buffer_index)
462{ 462{
463 struct slot_args slargs; 463 struct slot_args slargs;
464 struct orangefs_bufmap *bufmap = __orangefs_bufmap;
464 465
465 slargs.slot_count = bufmap->desc_count; 466 slargs.slot_count = bufmap->desc_count;
466 slargs.slot_array = bufmap->buffer_index_array; 467 slargs.slot_array = bufmap->buffer_index_array;
diff --git a/fs/orangefs/orangefs-bufmap.h b/fs/orangefs/orangefs-bufmap.h
index dff55e2857c5..2a2d4269d03e 100644
--- a/fs/orangefs/orangefs-bufmap.h
+++ b/fs/orangefs/orangefs-bufmap.h
@@ -21,7 +21,7 @@ void orangefs_bufmap_finalize(void);
21 21
22int orangefs_bufmap_get(struct orangefs_bufmap **mapp, int *buffer_index); 22int orangefs_bufmap_get(struct orangefs_bufmap **mapp, int *buffer_index);
23 23
24void orangefs_bufmap_put(struct orangefs_bufmap *bufmap, int buffer_index); 24void orangefs_bufmap_put(int buffer_index);
25 25
26int orangefs_readdir_index_get(struct orangefs_bufmap **mapp, int *buffer_index); 26int orangefs_readdir_index_get(struct orangefs_bufmap **mapp, int *buffer_index);
27 27