diff options
author | David Howells <dhowells@redhat.com> | 2008-02-07 03:15:36 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-07 11:42:27 -0500 |
commit | 473043dcee1874aab99f66b0362b344618eb3790 (patch) | |
tree | bc329501ec6cd0d31dfe11d4587347093dca4ccf /fs/ext3/resize.c | |
parent | 52fcf7032935b33158e3998ed399cac97447ab8d (diff) |
iget: stop EXT3 from using iget() and read_inode()
Stop the EXT3 filesystem from using iget() and read_inode(). Replace
ext3_read_inode() with ext3_iget(), and call that instead of iget().
ext3_iget() then uses iget_locked() directly and returns a proper error code
instead of an inode in the event of an error.
ext3_fill_super() returns any error incurred when getting the root inode
instead of EINVAL.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: "Theodore Ts'o" <tytso@mit.edu>
Acked-by: Jan Kara <jack@suse.cz>
Cc: <linux-ext4@vger.kernel.org>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ext3/resize.c')
-rw-r--r-- | fs/ext3/resize.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/ext3/resize.c b/fs/ext3/resize.c index 44de1453c301..ebc05af7343a 100644 --- a/fs/ext3/resize.c +++ b/fs/ext3/resize.c | |||
@@ -795,12 +795,11 @@ int ext3_group_add(struct super_block *sb, struct ext3_new_group_data *input) | |||
795 | "No reserved GDT blocks, can't resize"); | 795 | "No reserved GDT blocks, can't resize"); |
796 | return -EPERM; | 796 | return -EPERM; |
797 | } | 797 | } |
798 | inode = iget(sb, EXT3_RESIZE_INO); | 798 | inode = ext3_iget(sb, EXT3_RESIZE_INO); |
799 | if (!inode || is_bad_inode(inode)) { | 799 | if (IS_ERR(inode)) { |
800 | ext3_warning(sb, __FUNCTION__, | 800 | ext3_warning(sb, __FUNCTION__, |
801 | "Error opening resize inode"); | 801 | "Error opening resize inode"); |
802 | iput(inode); | 802 | return PTR_ERR(inode); |
803 | return -ENOENT; | ||
804 | } | 803 | } |
805 | } | 804 | } |
806 | 805 | ||