diff options
author | Eric Sandeen <sandeen@sandeen.net> | 2007-08-30 03:21:38 -0400 |
---|---|---|
committer | Tim Shimmin <tes@chook.melbourne.sgi.com> | 2007-09-20 05:40:19 -0400 |
commit | bcc7b445eff295664a3a3ab14e742b3c9d88e6e3 (patch) | |
tree | c01cd93a01607b2fd3e05ba177e54f135607ea0f /fs/xfs | |
parent | b394e43e995d08821588a22561c6a71a63b4ff27 (diff) |
[XFS] fix filestreams on 32-bit boxes
xfs_filestream_mount() sets up an mru cache with:
err = xfs_mru_cache_create(&mp->m_filestream, lifetime, grp_count,
(xfs_mru_cache_free_func_t)xfs_fstrm_free_func);
but that cast is causing problems...
typedef void (*xfs_mru_cache_free_func_t)(unsigned long, void*);
but:
void xfs_fstrm_free_func( xfs_ino_t ino, fstrm_item_t *item)
so on a 32-bit box, it's casting (32, 32) args into (64, 32) and I assume
it's getting garbage for *item, which subsequently causes an explosion.
With this change the filestreams xfsqa tests don't oops on my 32-bit box.
SGI-PV: 967795
SGI-Modid: xfs-linux-melb:xfs-kern:29510a
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_filestream.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/xfs/xfs_filestream.c b/fs/xfs/xfs_filestream.c index 16f8e175167d..36d8f6aa11af 100644 --- a/fs/xfs/xfs_filestream.c +++ b/fs/xfs/xfs_filestream.c | |||
@@ -350,9 +350,10 @@ _xfs_filestream_update_ag( | |||
350 | /* xfs_fstrm_free_func(): callback for freeing cached stream items. */ | 350 | /* xfs_fstrm_free_func(): callback for freeing cached stream items. */ |
351 | void | 351 | void |
352 | xfs_fstrm_free_func( | 352 | xfs_fstrm_free_func( |
353 | xfs_ino_t ino, | 353 | unsigned long ino, |
354 | fstrm_item_t *item) | 354 | void *data) |
355 | { | 355 | { |
356 | fstrm_item_t *item = (fstrm_item_t *)data; | ||
356 | xfs_inode_t *ip = item->ip; | 357 | xfs_inode_t *ip = item->ip; |
357 | int ref; | 358 | int ref; |
358 | 359 | ||
@@ -438,7 +439,7 @@ xfs_filestream_mount( | |||
438 | grp_count = 10; | 439 | grp_count = 10; |
439 | 440 | ||
440 | err = xfs_mru_cache_create(&mp->m_filestream, lifetime, grp_count, | 441 | err = xfs_mru_cache_create(&mp->m_filestream, lifetime, grp_count, |
441 | (xfs_mru_cache_free_func_t)xfs_fstrm_free_func); | 442 | xfs_fstrm_free_func); |
442 | 443 | ||
443 | return err; | 444 | return err; |
444 | } | 445 | } |