From b8a99a8f9f0aebf2a75bb0d9280bff7e7ac9b57e Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 16 Feb 2016 20:10:26 -0500 Subject: 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 Signed-off-by: Mike Marshall --- fs/orangefs/dir.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fs/orangefs/dir.c') diff --git a/fs/orangefs/dir.c b/fs/orangefs/dir.c index 53a411732606..f30b6ecacdd1 100644 --- a/fs/orangefs/dir.c +++ b/fs/orangefs/dir.c @@ -141,7 +141,6 @@ out: */ static int orangefs_readdir(struct file *file, struct dir_context *ctx) { - struct orangefs_bufmap *bufmap = NULL; int ret = 0; int buffer_index; /* @@ -205,8 +204,9 @@ static int orangefs_readdir(struct file *file, struct dir_context *ctx) new_op->upcall.req.readdir.token = *ptoken; get_new_buffer_index: - ret = orangefs_readdir_index_get(&bufmap, &buffer_index); - if (ret < 0) { + buffer_index = orangefs_readdir_index_get(); + if (buffer_index < 0) { + ret = buffer_index; gossip_lerr("orangefs_readdir: orangefs_readdir_index_get() failure (%d)\n", ret); goto out_free_op; -- cgit