diff options
author | Joern Engel <joern@logfs.org> | 2010-05-03 20:54:34 +0200 |
---|---|---|
committer | Joern Engel <joern@logfs.org> | 2010-05-04 19:37:04 +0200 |
commit | 20503664b008e17976bff1fdbc693c77ebd6f6c9 (patch) | |
tree | 7cff886995e42d0b90dd3ebe86993f0277e9345c /fs/logfs/logfs.h | |
parent | ccc0197b02178f7e1707e659cbc5242fc94b499a (diff) | |
download | linux-20503664b008e17976bff1fdbc693c77ebd6f6c9.tar.bz2 |
logfs: survive logfs_buf_recover read errors
Refusing to mount beats a kernel crash.
Signed-off-by: Joern Engel <joern@logfs.org>
Diffstat (limited to 'fs/logfs/logfs.h')
-rw-r--r-- | fs/logfs/logfs.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/logfs/logfs.h b/fs/logfs/logfs.h index 0a3df1a0c936..32bf55616e56 100644 --- a/fs/logfs/logfs.h +++ b/fs/logfs/logfs.h @@ -598,19 +598,19 @@ void freeseg(struct super_block *sb, u32 segno); int logfs_init_areas(struct super_block *sb); void logfs_cleanup_areas(struct super_block *sb); int logfs_open_area(struct logfs_area *area, size_t bytes); -void __logfs_buf_write(struct logfs_area *area, u64 ofs, void *buf, size_t len, +int __logfs_buf_write(struct logfs_area *area, u64 ofs, void *buf, size_t len, int use_filler); -static inline void logfs_buf_write(struct logfs_area *area, u64 ofs, +static inline int logfs_buf_write(struct logfs_area *area, u64 ofs, void *buf, size_t len) { - __logfs_buf_write(area, ofs, buf, len, 0); + return __logfs_buf_write(area, ofs, buf, len, 0); } -static inline void logfs_buf_recover(struct logfs_area *area, u64 ofs, +static inline int logfs_buf_recover(struct logfs_area *area, u64 ofs, void *buf, size_t len) { - __logfs_buf_write(area, ofs, buf, len, 1); + return __logfs_buf_write(area, ofs, buf, len, 1); } /* super.c */ |