summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_attr_leaf.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2005-11-02 05:00:20 +0100
committerNathan Scott <nathans@sgi.com>2005-11-02 05:00:20 +0100
commitda087bad810b48dd889a504e6af0a582ba18df0d (patch)
tree2b94f17722bc632dde1ca2ab9805e0f51b57054e /fs/xfs/xfs_attr_leaf.c
parent[XFS] Remove dead code in xfs_iomap_write_direct; save some stack (diff)
downloadlinux-da087bad810b48dd889a504e6af0a582ba18df0d.tar.xz
linux-da087bad810b48dd889a504e6af0a582ba18df0d.zip
[XFS] Fix up a 32/64 local flags variable issue when enabling attr2 mode.
SGI-PV: 941645 SGI-Modid: xfs-linux:xfs-kern:23925a Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_attr_leaf.c')
-rw-r--r--fs/xfs/xfs_attr_leaf.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/xfs/xfs_attr_leaf.c b/fs/xfs/xfs_attr_leaf.c
index 52a847e6abf7..35e557b00db2 100644
--- a/fs/xfs/xfs_attr_leaf.c
+++ b/fs/xfs/xfs_attr_leaf.c
@@ -117,12 +117,6 @@ xfs_attr_shortform_bytesfit(xfs_inode_t *dp, int bytes)
int maxforkoff; /* upper limit on valid forkoff locations */
xfs_mount_t *mp = dp->i_mount;
- if (unlikely(mp->m_flags & XFS_MOUNT_COMPAT_ATTR)) {
- if (bytes <= XFS_IFORK_ASIZE(dp))
- return mp->m_attroffset >> 3;
- return 0;
- }
-
offset = (XFS_LITINO(mp) - bytes) >> 3; /* rounded down */
switch (dp->i_d.di_format) {
@@ -134,6 +128,12 @@ xfs_attr_shortform_bytesfit(xfs_inode_t *dp, int bytes)
return (offset >= minforkoff) ? minforkoff : 0;
}
+ if (unlikely(mp->m_flags & XFS_MOUNT_COMPAT_ATTR)) {
+ if (bytes <= XFS_IFORK_ASIZE(dp))
+ return mp->m_attroffset >> 3;
+ return 0;
+ }
+
/* data fork btree root can have at least this many key/ptr pairs */
minforkoff = MAX(dp->i_df.if_bytes, XFS_BMDR_SPACE_CALC(MINDBTPTRS));
minforkoff = roundup(minforkoff, 8) >> 3;