]> git.baikalelectronics.ru Git - kernel.git/commit
[XFS] Always use di_forkoff when checking for attr space.
authorEric Sandeen <sandeen@sandeen.net>
Thu, 17 Apr 2008 06:50:09 +0000 (16:50 +1000)
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Fri, 18 Apr 2008 02:03:40 +0000 (12:03 +1000)
commitddef17b16a9bdbe256c891799588f24142d31860
tree33e0c38d5b4f67455804c793e625a0f7e91aec5c
parentb5bd9413040c3f34c726fc91f93116c56bebf99b
[XFS] Always use di_forkoff when checking for attr space.

In the case where we mount a filesystem which was previously using the
attr2 format as attr1, returning the default mp->m_attroffset instead of
the per-inode di_forkoff for inline attribute fit calculations, may result
in corruption, if for example, the data fork is already taking more space
than the default fork offset and we try to add an extended attribute. Fix
tested by xfstests/186.

SGI-PV: 979606
SGI-Modid: xfs-linux-melb:xfs-kern:30861a

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
fs/xfs/xfs_attr_leaf.c