summaryrefslogtreecommitdiff
path: root/fs/orangefs/file.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-02-17 04:10:26 +0300
committerMike Marshall <hubcap@omnibond.com>2016-03-26 05:30:54 +0300
commitb8a99a8f9f0aebf2a75bb0d9280bff7e7ac9b57e (patch)
treed987f21f5f1c7ea83b62fcf7d0bda6f10971d285 /fs/orangefs/file.c
parentbf6bf606e545cb31c29499b354c13b2621acd649 (diff)
downloadlinux-b8a99a8f9f0aebf2a75bb0d9280bff7e7ac9b57e.tar.xz
orangefs: saner calling conventions for getting a slot
just have it return the slot number or -E... - the caller checks the sign anyway Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'fs/orangefs/file.c')
-rw-r--r--fs/orangefs/file.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c
index db9dd6ebcc3f..63e6a10ab13d 100644
--- a/fs/orangefs/file.c
+++ b/fs/orangefs/file.c
@@ -87,7 +87,6 @@ static ssize_t wait_for_direct_io(enum ORANGEFS_io_type type, struct inode *inod
{
struct orangefs_inode_s *orangefs_inode = ORANGEFS_I(inode);
struct orangefs_khandle *handle = &orangefs_inode->refn.khandle;
- struct orangefs_bufmap *bufmap = NULL;
struct orangefs_kernel_op_s *new_op = NULL;
struct iov_iter saved = *iter;
int buffer_index = -1;
@@ -104,11 +103,12 @@ static ssize_t wait_for_direct_io(enum ORANGEFS_io_type type, struct inode *inod
populate_shared_memory:
/* get a shared buffer index */
- ret = orangefs_bufmap_get(&bufmap, &buffer_index);
- if (ret < 0) {
+ buffer_index = orangefs_bufmap_get();
+ if (buffer_index < 0) {
+ ret = buffer_index;
gossip_debug(GOSSIP_FILE_DEBUG,
- "%s: orangefs_bufmap_get failure (%ld)\n",
- __func__, (long)ret);
+ "%s: orangefs_bufmap_get failure (%zd)\n",
+ __func__, ret);
goto out;
}
gossip_debug(GOSSIP_FILE_DEBUG,