get rid of bufmap argument of orangefs_bufmap_put()
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 12 Feb 2016 02:34:52 +0000 (21:34 -0500)
committerMike Marshall <hubcap@omnibond.com>
Fri, 12 Feb 2016 20:05:33 +0000 (15:05 -0500)
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>
fs/orangefs/file.c
fs/orangefs/orangefs-bufmap.c
fs/orangefs/orangefs-bufmap.h

index dafa03ef0107302ec3b6e5a5eb1b28b1622f91d9..193671c137c35cb3b7044afaf93e285e463b8fd8 100644 (file)
@@ -170,7 +170,7 @@ populate_shared_memory:
         * a new shared memory location.
         */
        if (ret == -EAGAIN && op_state_purged(new_op)) {
-               orangefs_bufmap_put(bufmap, buffer_index);
+               orangefs_bufmap_put(buffer_index);
                buffer_index = -1;
                if (type == ORANGEFS_IO_WRITE)
                        *iter = saved;
@@ -190,7 +190,7 @@ populate_shared_memory:
                } else {
                        complete(&new_op->done);
                }
-               orangefs_bufmap_put(bufmap, buffer_index);
+               orangefs_bufmap_put(buffer_index);
                buffer_index = -1;
                /*
                 * don't write an error to syslog on signaled operation
@@ -239,7 +239,7 @@ done_copying:
 
 out:
        if (buffer_index >= 0) {
-               orangefs_bufmap_put(bufmap, buffer_index);
+               orangefs_bufmap_put(buffer_index);
                gossip_debug(GOSSIP_FILE_DEBUG,
                             "%s(%pU): PUT buffer_index %d\n",
                             __func__, handle, buffer_index);
index c60019de1fd8626892382b3b15edd0642b636889..1819dee584334800ed69490e40016b5698a41eba 100644 (file)
@@ -458,9 +458,10 @@ int orangefs_bufmap_get(struct orangefs_bufmap **mapp, int *buffer_index)
  *
  * no return value
  */
-void orangefs_bufmap_put(struct orangefs_bufmap *bufmap, int buffer_index)
+void orangefs_bufmap_put(int buffer_index)
 {
        struct slot_args slargs;
+       struct orangefs_bufmap *bufmap = __orangefs_bufmap;
 
        slargs.slot_count = bufmap->desc_count;
        slargs.slot_array = bufmap->buffer_index_array;
index dff55e2857c5ca0fa76da1c6c5f50f0e12047594..2a2d4269d03ebf257fb76a037b490ca75c598bef 100644 (file)
@@ -21,7 +21,7 @@ void orangefs_bufmap_finalize(void);
 
 int orangefs_bufmap_get(struct orangefs_bufmap **mapp, int *buffer_index);
 
-void orangefs_bufmap_put(struct orangefs_bufmap *bufmap, int buffer_index);
+void orangefs_bufmap_put(int buffer_index);
 
 int orangefs_readdir_index_get(struct orangefs_bufmap **mapp, int *buffer_index);