git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ocfs2: Wrap inode block reads in a dedicated function.
[safe/jmp/linux-2.6]
/
fs
/
ocfs2
/
aops.c
diff --git
a/fs/ocfs2/aops.c
b/fs/ocfs2/aops.c
index
c22543b
..
e219f8b
100644
(file)
--- a/
fs/ocfs2/aops.c
+++ b/
fs/ocfs2/aops.c
@@
-68,20
+68,13
@@
static int ocfs2_symlink_get_block(struct inode *inode, sector_t iblock,
goto bail;
}
goto bail;
}
- status = ocfs2_read_
block(inode, OCFS2_I(inode)->ip_blkno
, &bh);
+ status = ocfs2_read_
inode_block(inode
, &bh);
if (status < 0) {
mlog_errno(status);
goto bail;
}
fe = (struct ocfs2_dinode *) bh->b_data;
if (status < 0) {
mlog_errno(status);
goto bail;
}
fe = (struct ocfs2_dinode *) bh->b_data;
- if (!OCFS2_IS_VALID_DINODE(fe)) {
- mlog(ML_ERROR, "Invalid dinode #%llu: signature = %.*s\n",
- (unsigned long long)le64_to_cpu(fe->i_blkno), 7,
- fe->i_signature);
- goto bail;
- }
-
if ((u64)iblock >= ocfs2_clusters_to_blocks(inode->i_sb,
le32_to_cpu(fe->i_clusters))) {
mlog(ML_ERROR, "block offset is outside the allocated size: "
if ((u64)iblock >= ocfs2_clusters_to_blocks(inode->i_sb,
le32_to_cpu(fe->i_clusters))) {
mlog(ML_ERROR, "block offset is outside the allocated size: "
@@
-262,7
+255,7
@@
static int ocfs2_readpage_inline(struct inode *inode, struct page *page)
BUG_ON(!PageLocked(page));
BUG_ON(!(OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL));
BUG_ON(!PageLocked(page));
BUG_ON(!(OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL));
- ret = ocfs2_read_
block(inode, OCFS2_I(inode)->ip_blkno
, &di_bh);
+ ret = ocfs2_read_
inode_block(inode
, &di_bh);
if (ret) {
mlog_errno(ret);
goto out;
if (ret) {
mlog_errno(ret);
goto out;