dir: Fix DRead
authorAndrew Deason <adeason@sinenomine.net>
Tue, 21 Jun 2011 23:33:16 +0000 (18:33 -0500)
committerDerrick Brashear <shadow@dementia.org>
Wed, 22 Jun 2011 05:15:09 +0000 (22:15 -0700)
DRead was missing a return statement in one of the cases where we
found the buffer we were looking for, so we locked the buffer but kept
looking. Return it instead.

Change-Id: If72a0ba3ce60a847f2796b51a82f0f473bbc608a
Reviewed-on: http://gerrit.openafs.org/4877
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

src/dir/buffer.c

index 8a99d4b..e903345 100644 (file)
@@ -210,6 +210,7 @@ DRead(dir_file_t fid, int page, struct DirBuffer *entry)
                        ReleaseWriteLock(&tb->lock);
                        entry->buffer = tb;
                        entry->data = tb->data;
+                       return 0;
                    }
                } else
                    break;