diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-11 13:36:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-11 13:36:12 -0400 |
commit | 0a33f80a8373eca7f4bea3961d1346c3815fa5ed (patch) | |
tree | 16b0c0364340416f1e27bebdd4042ffe0e6fef8f /fs/gfs2/bmap.c | |
parent | c29f5ec022451546be1e0b24c330a0368e63e4a7 (diff) | |
parent | 003dec8913d6bebb4ecc989ec04a235cf38f5ea9 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw
* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw: (25 commits)
GFS2: Merge gfs2_get_sb into gfs2_get_sb_meta
GFS2: Fix cache coherency between truncate and O_DIRECT read
GFS2: Fix locking issue mounting gfs2meta fs
GFS2: Remove unused variable
GFS2: smbd proccess hangs with flock() call.
GFS2: Remove args subdir from gfs2 sysfs files
GFS2: Remove lockstruct subdir from gfs2 sysfs files
GFS2: Move gfs2_unlink_ok into ops_inode.c
GFS2: Move gfs2_readlinki into ops_inode.c
GFS2: Move gfs2_rmdiri into ops_inode.c
GFS2: Merge mount.c and ops_super.c into super.c
GFS2: Clean up some file names
GFS2: Be more aggressive in reclaiming unlinked inodes
GFS2: Add a rgrp bitmap full flag
GFS2: Improve resource group error handling
GFS2: Don't warn when delete inode fails on ro filesystem
GFS2: Update docs
GFS2: Umount recovery race fix
GFS2: Remove a couple of unused sysfs entries
GFS2: Add commit= mount option
...
Diffstat (limited to 'fs/gfs2/bmap.c')
-rw-r--r-- | fs/gfs2/bmap.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 3a5d3f883e10..329763530dc0 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include "trans.h" | 25 | #include "trans.h" |
26 | #include "dir.h" | 26 | #include "dir.h" |
27 | #include "util.h" | 27 | #include "util.h" |
28 | #include "ops_address.h" | ||
29 | 28 | ||
30 | /* This doesn't need to be that large as max 64 bit pointers in a 4k | 29 | /* This doesn't need to be that large as max 64 bit pointers in a 4k |
31 | * block is 512, so __u16 is fine for that. It saves stack space to | 30 | * block is 512, so __u16 is fine for that. It saves stack space to |
@@ -136,7 +135,9 @@ int gfs2_unstuff_dinode(struct gfs2_inode *ip, struct page *page) | |||
136 | and write it out to disk */ | 135 | and write it out to disk */ |
137 | 136 | ||
138 | unsigned int n = 1; | 137 | unsigned int n = 1; |
139 | block = gfs2_alloc_block(ip, &n); | 138 | error = gfs2_alloc_block(ip, &block, &n); |
139 | if (error) | ||
140 | goto out_brelse; | ||
140 | if (isdir) { | 141 | if (isdir) { |
141 | gfs2_trans_add_unrevoke(GFS2_SB(&ip->i_inode), block, 1); | 142 | gfs2_trans_add_unrevoke(GFS2_SB(&ip->i_inode), block, 1); |
142 | error = gfs2_dir_get_new_buffer(ip, block, &bh); | 143 | error = gfs2_dir_get_new_buffer(ip, block, &bh); |
@@ -476,8 +477,11 @@ static int gfs2_bmap_alloc(struct inode *inode, const sector_t lblock, | |||
476 | blks = dblks + iblks; | 477 | blks = dblks + iblks; |
477 | i = sheight; | 478 | i = sheight; |
478 | do { | 479 | do { |
480 | int error; | ||
479 | n = blks - alloced; | 481 | n = blks - alloced; |
480 | bn = gfs2_alloc_block(ip, &n); | 482 | error = gfs2_alloc_block(ip, &bn, &n); |
483 | if (error) | ||
484 | return error; | ||
481 | alloced += n; | 485 | alloced += n; |
482 | if (state != ALLOC_DATA || gfs2_is_jdata(ip)) | 486 | if (state != ALLOC_DATA || gfs2_is_jdata(ip)) |
483 | gfs2_trans_add_unrevoke(sdp, bn, n); | 487 | gfs2_trans_add_unrevoke(sdp, bn, n); |
@@ -1008,7 +1012,7 @@ static int gfs2_block_truncate_page(struct address_space *mapping) | |||
1008 | gfs2_trans_add_bh(ip->i_gl, bh, 0); | 1012 | gfs2_trans_add_bh(ip->i_gl, bh, 0); |
1009 | 1013 | ||
1010 | zero_user(page, offset, length); | 1014 | zero_user(page, offset, length); |
1011 | 1015 | mark_buffer_dirty(bh); | |
1012 | unlock: | 1016 | unlock: |
1013 | unlock_page(page); | 1017 | unlock_page(page); |
1014 | page_cache_release(page); | 1018 | page_cache_release(page); |