Commit 1357d06d authored by Al Viro's avatar Al Viro Committed by Mike Marshall

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: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarMike Marshall <hubcap@omnibond.com>
parent c0eae8cd
...@@ -170,7 +170,7 @@ static ssize_t wait_for_direct_io(enum ORANGEFS_io_type type, struct inode *inod ...@@ -170,7 +170,7 @@ static ssize_t wait_for_direct_io(enum ORANGEFS_io_type type, struct inode *inod
* a new shared memory location. * a new shared memory location.
*/ */
if (ret == -EAGAIN && op_state_purged(new_op)) { if (ret == -EAGAIN && op_state_purged(new_op)) {
orangefs_bufmap_put(bufmap, buffer_index); orangefs_bufmap_put(buffer_index);
buffer_index = -1; buffer_index = -1;
if (type == ORANGEFS_IO_WRITE) if (type == ORANGEFS_IO_WRITE)
*iter = saved; *iter = saved;
...@@ -190,7 +190,7 @@ static ssize_t wait_for_direct_io(enum ORANGEFS_io_type type, struct inode *inod ...@@ -190,7 +190,7 @@ static ssize_t wait_for_direct_io(enum ORANGEFS_io_type type, struct inode *inod
} else { } else {
complete(&new_op->done); complete(&new_op->done);
} }
orangefs_bufmap_put(bufmap, buffer_index); orangefs_bufmap_put(buffer_index);
buffer_index = -1; buffer_index = -1;
/* /*
* don't write an error to syslog on signaled operation * don't write an error to syslog on signaled operation
...@@ -239,7 +239,7 @@ static ssize_t wait_for_direct_io(enum ORANGEFS_io_type type, struct inode *inod ...@@ -239,7 +239,7 @@ static ssize_t wait_for_direct_io(enum ORANGEFS_io_type type, struct inode *inod
out: out:
if (buffer_index >= 0) { if (buffer_index >= 0) {
orangefs_bufmap_put(bufmap, buffer_index); orangefs_bufmap_put(buffer_index);
gossip_debug(GOSSIP_FILE_DEBUG, gossip_debug(GOSSIP_FILE_DEBUG,
"%s(%pU): PUT buffer_index %d\n", "%s(%pU): PUT buffer_index %d\n",
__func__, handle, buffer_index); __func__, handle, buffer_index);
......
...@@ -458,9 +458,10 @@ int orangefs_bufmap_get(struct orangefs_bufmap **mapp, int *buffer_index) ...@@ -458,9 +458,10 @@ int orangefs_bufmap_get(struct orangefs_bufmap **mapp, int *buffer_index)
* *
* no return value * 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 slot_args slargs;
struct orangefs_bufmap *bufmap = __orangefs_bufmap;
slargs.slot_count = bufmap->desc_count; slargs.slot_count = bufmap->desc_count;
slargs.slot_array = bufmap->buffer_index_array; slargs.slot_array = bufmap->buffer_index_array;
......
...@@ -21,7 +21,7 @@ void orangefs_bufmap_finalize(void); ...@@ -21,7 +21,7 @@ void orangefs_bufmap_finalize(void);
int orangefs_bufmap_get(struct orangefs_bufmap **mapp, int *buffer_index); 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); int orangefs_readdir_index_get(struct orangefs_bufmap **mapp, int *buffer_index);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment