[Ocfs2-devel] [PATCH 3/5] ocfs2: Check errors from ocfs2_xattr_update_xattr_search()
Joel Becker
joel.becker at oracle.com
Mon Oct 20 19:08:16 PDT 2008
The ocfs2_xattr_update_xattr_search() function can return an error when
trying to read blocks off of disk. The caller needs to check this error
before using those (possibly invalid) blocks.
Signed-off-by: Joel Becker <joel.becker at oracle.com>
---
fs/ocfs2/xattr.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index ec262ef..90cd7d0 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -2812,7 +2812,11 @@ static int ocfs2_xattr_create_index_block(struct inode *inode,
if (data_bh)
ocfs2_journal_dirty(handle, data_bh);
- ocfs2_xattr_update_xattr_search(inode, xs, xb_bh, xh_bh);
+ ret = ocfs2_xattr_update_xattr_search(inode, xs, xb_bh, xh_bh);
+ if (ret) {
+ mlog_errno(ret);
+ goto out_commit;
+ }
/* Change from ocfs2_xattr_header to ocfs2_xattr_tree_root */
memset(&xb->xb_attrs, 0, inode->i_sb->s_blocksize -
--
1.5.6.5
More information about the Ocfs2-devel
mailing list