diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-11-19 01:26:20 -0500 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2011-01-10 00:05:45 -0500 |
commit | e828949e5b42bfd234ee537cdb7c5e3a577958a3 (patch) | |
tree | c2e259a3020acdb943669fb01e5a7dc5598a6fe9 /fs/nilfs2/mdt.c | |
parent | b004a5eb0babec7ef91558f73315ef49e5a1f285 (diff) |
nilfs2: call nilfs_error inside bmap routines
Some functions using nilfs bmap routines can wrongly return invalid
argument error (i.e. -EINVAL) that bmap returns as an internal code
for btree corruption.
This fixes the issue by catching and converting the internal EINVAL to
EIO and calling nilfs_error function inside bmap routines.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/mdt.c')
-rw-r--r-- | fs/nilfs2/mdt.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/nilfs2/mdt.c b/fs/nilfs2/mdt.c index 39a5b84e2c9f..f5d4b184eaf9 100644 --- a/fs/nilfs2/mdt.c +++ b/fs/nilfs2/mdt.c | |||
@@ -237,8 +237,6 @@ static int nilfs_mdt_read_block(struct inode *inode, unsigned long block, | |||
237 | * | 237 | * |
238 | * %-ENOENT - the specified block does not exist (hole block) | 238 | * %-ENOENT - the specified block does not exist (hole block) |
239 | * | 239 | * |
240 | * %-EINVAL - bmap is broken. (the caller should call nilfs_error()) | ||
241 | * | ||
242 | * %-EROFS - Read only filesystem (for create mode) | 240 | * %-EROFS - Read only filesystem (for create mode) |
243 | */ | 241 | */ |
244 | int nilfs_mdt_get_block(struct inode *inode, unsigned long blkoff, int create, | 242 | int nilfs_mdt_get_block(struct inode *inode, unsigned long blkoff, int create, |
@@ -273,8 +271,6 @@ int nilfs_mdt_get_block(struct inode *inode, unsigned long blkoff, int create, | |||
273 | * %-ENOMEM - Insufficient memory available. | 271 | * %-ENOMEM - Insufficient memory available. |
274 | * | 272 | * |
275 | * %-EIO - I/O error | 273 | * %-EIO - I/O error |
276 | * | ||
277 | * %-EINVAL - bmap is broken. (the caller should call nilfs_error()) | ||
278 | */ | 274 | */ |
279 | int nilfs_mdt_delete_block(struct inode *inode, unsigned long block) | 275 | int nilfs_mdt_delete_block(struct inode *inode, unsigned long block) |
280 | { | 276 | { |
@@ -350,8 +346,6 @@ int nilfs_mdt_forget_block(struct inode *inode, unsigned long block) | |||
350 | * %-EIO - I/O error | 346 | * %-EIO - I/O error |
351 | * | 347 | * |
352 | * %-ENOENT - the specified block does not exist (hole block) | 348 | * %-ENOENT - the specified block does not exist (hole block) |
353 | * | ||
354 | * %-EINVAL - bmap is broken. (the caller should call nilfs_error()) | ||
355 | */ | 349 | */ |
356 | int nilfs_mdt_mark_block_dirty(struct inode *inode, unsigned long block) | 350 | int nilfs_mdt_mark_block_dirty(struct inode *inode, unsigned long block) |
357 | { | 351 | { |