]> git.neil.brown.name Git - history.git/commitdiff
[XFS] Contributed fix from ASANO Masahiro <masano@tnes.nec.co.jp>. In calculating
authorStephen Lord <lord@sgi.com>
Wed, 6 Nov 2002 22:01:45 +0000 (23:01 +0100)
committerNathan Scott <nathans@sgi.com>
Wed, 6 Nov 2002 22:01:45 +0000 (23:01 +0100)
the layout of a log record for a buffer, the linux code deals with buffers
which are not contiguous in memory - this only applies to an inode buffer.
This adds one more fragmentation case to the code, and a line was missing
from this. The end result would be the logging of too much data if this
was not the last component of the buffer.

The code was definitely wrong, but I think the chances of hitting this were
pretty slim, and the resulting error would only matter if there was a
crash shortly afterward.

SGI Modid: 2.5.x-xfs:slinx:131221a

fs/xfs/xfs_buf_item.c

index 35408d7e3575ce34e86211697553c773da9c1f22..8499747e90356c4aa67882308fe540fbf7353a57 100644 (file)
@@ -331,6 +331,7 @@ xfs_buf_item_format(
                        vecp++;
                        first_bit = next_bit;
                        last_bit = next_bit;
+                       nbits = 1;
                } else {
                        last_bit++;
                        nbits++;