]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
dir: add missing return in DRead
authorMarc Dionne <marc.c.dionne@gmail.com>
Mon, 24 Oct 2011 02:45:21 +0000 (22:45 -0400)
committerDerrick Brashear <shadow@dementix.org>
Mon, 24 Oct 2011 10:42:53 +0000 (03:42 -0700)
A missing return in the kernel version of DRead causes the code to
think that no entry exists for a dir and proceed to allocate a new
one, if the entry is the third one in the hash chain.

If the existing entry is dirty, its contents are never written back,
and the pending changes to the directory are not seen by the client.

Change-Id: I8b0f86b04d6ac8f75720933308a0983810974ff4
Reviewed-on: http://gerrit.openafs.org/5666
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
src/afs/afs_buffer.c

index e9585a725f74054712c0d706c7a3ed81e28b2fef..52243d6b04affeef04eedcd78d418fd132a1d215 100644 (file)
@@ -206,6 +206,7 @@ DRead(struct dcache *adc, int page, struct DirBuffer *entry)
                        ReleaseWriteLock(&tb->lock);
                        entry->buffer = tb;
                        entry->data = tb->data;
+                       return 0;
                    }
                } else
                    break;