diff options
author | Jan Kara <jack@suse.cz> | 2005-06-24 01:01:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-24 03:05:19 -0400 |
commit | bd6a1f16fffdfe010fdc2979fd01f12357816762 (patch) | |
tree | 528e4ed005ee45936d8d8bd5cc490e0826bd27e9 /fs/reiserfs/inode.c | |
parent | 92198f7eaa5df3479341dd8fa20c2c81aa3b1e25 (diff) |
[PATCH] reiserfs: add checking of journal_begin() return value
Check return values of journal_begin() and journal_end() in the quota code
for reiserfs.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/reiserfs/inode.c')
-rw-r--r-- | fs/reiserfs/inode.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index 2711dff1b7b4..073425e6e0a9 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c | |||
@@ -2798,7 +2798,9 @@ int reiserfs_setattr(struct dentry *dentry, struct iattr *attr) { | |||
2798 | struct reiserfs_transaction_handle th; | 2798 | struct reiserfs_transaction_handle th; |
2799 | 2799 | ||
2800 | /* (user+group)*(old+new) structure - we count quota info and , inode write (sb, inode) */ | 2800 | /* (user+group)*(old+new) structure - we count quota info and , inode write (sb, inode) */ |
2801 | journal_begin(&th, inode->i_sb, 4*REISERFS_QUOTA_INIT_BLOCKS+2); | 2801 | error = journal_begin(&th, inode->i_sb, 4*REISERFS_QUOTA_INIT_BLOCKS+2); |
2802 | if (error) | ||
2803 | goto out; | ||
2802 | error = DQUOT_TRANSFER(inode, attr) ? -EDQUOT : 0; | 2804 | error = DQUOT_TRANSFER(inode, attr) ? -EDQUOT : 0; |
2803 | if (error) { | 2805 | if (error) { |
2804 | journal_end(&th, inode->i_sb, 4*REISERFS_QUOTA_INIT_BLOCKS+2); | 2806 | journal_end(&th, inode->i_sb, 4*REISERFS_QUOTA_INIT_BLOCKS+2); |
@@ -2811,7 +2813,7 @@ int reiserfs_setattr(struct dentry *dentry, struct iattr *attr) { | |||
2811 | if (attr->ia_valid & ATTR_GID) | 2813 | if (attr->ia_valid & ATTR_GID) |
2812 | inode->i_gid = attr->ia_gid; | 2814 | inode->i_gid = attr->ia_gid; |
2813 | mark_inode_dirty(inode); | 2815 | mark_inode_dirty(inode); |
2814 | journal_end(&th, inode->i_sb, 4*REISERFS_QUOTA_INIT_BLOCKS+2); | 2816 | error = journal_end(&th, inode->i_sb, 4*REISERFS_QUOTA_INIT_BLOCKS+2); |
2815 | } | 2817 | } |
2816 | } | 2818 | } |
2817 | if (!error) | 2819 | if (!error) |