diff options
author | David Chinner <dgc@sgi.com> | 2008-04-09 22:21:46 -0400 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-04-17 21:59:12 -0400 |
commit | d87dd6360dce86cad9099aed74f14b4dd0143301 (patch) | |
tree | 743ea201fa895e75be79f357b0246c35a0726dcc /fs/xfs/linux-2.6 | |
parent | c2b1cba6833da77b1b478ac144f9cf5144d276ec (diff) |
[XFS] Warn if errors come from block_truncate_page().
block_truncate_page() can return errors that we currently ignore and
silently discard. We should not ever get errors reported here - an error
indicates a bug somewhere else. Hence catch the error and issue a stack
dump to the syslog because we cannot propagate the error any further up
the call chain.
SGI-PV: 980084
SGI-Modid: xfs-linux-melb:xfs-kern:30800a
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_iops.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index 53f8feb28e58..41e7baabfd9f 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c | |||
@@ -692,11 +692,19 @@ xfs_vn_setattr( | |||
692 | return -error; | 692 | return -error; |
693 | } | 693 | } |
694 | 694 | ||
695 | /* | ||
696 | * block_truncate_page can return an error, but we can't propagate it | ||
697 | * at all here. Leave a complaint + stack trace in the syslog because | ||
698 | * this could be bad. If it is bad, we need to propagate the error further. | ||
699 | */ | ||
695 | STATIC void | 700 | STATIC void |
696 | xfs_vn_truncate( | 701 | xfs_vn_truncate( |
697 | struct inode *inode) | 702 | struct inode *inode) |
698 | { | 703 | { |
699 | block_truncate_page(inode->i_mapping, inode->i_size, xfs_get_blocks); | 704 | int error; |
705 | error = block_truncate_page(inode->i_mapping, inode->i_size, | ||
706 | xfs_get_blocks); | ||
707 | WARN_ON(error); | ||
700 | } | 708 | } |
701 | 709 | ||
702 | STATIC int | 710 | STATIC int |