]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
libxfs: clear the buffer error while the buffer is locked
authorDave Chinner <dchinner@redhat.com>
Fri, 11 Jul 2014 02:00:28 +0000 (12:00 +1000)
committerDave Chinner <david@fromorbit.com>
Fri, 11 Jul 2014 02:00:28 +0000 (12:00 +1000)
commitcee99cfa7ccb720f60b6cf77997792efbd90a413
treec5d2fb48b4823e65d2224126346ea92bfe486250
parent871fbfd5ce2bfdc8030371aa3b1517efc03d9455
libxfs: clear the buffer error while the buffer is locked

When releasing a buffer, the error shoul dbe cleared while the lock
is still held on the buffer to avoid racing with a new user of the
buffer.

This was pointed out in review of commit 6af7c1e ("libxfs: reused
invalidated buffers leak state and data") but the version committed
didn't have the fix. Thanks to Christoph Hellwig for checking and
pointing out the oversight.

Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
libxfs/rdwr.c