diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-05 16:20:53 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-05 16:20:53 -0500 |
commit | e213e26ab3988c516c06eba4dcd030ac052f6dc9 (patch) | |
tree | 6e26fbdbb842b387697d73daf6e70cf718269a77 /fs/jfs/jfs_extent.c | |
parent | c812a51d11bbe983f4c24e32b59b265705ddd3c2 (diff) | |
parent | efd8f0e6f6c1faa041f228d7113bd3a9db802d49 (diff) |
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6: (33 commits)
quota: stop using QUOTA_OK / NO_QUOTA
dquot: cleanup dquot initialize routine
dquot: move dquot initialization responsibility into the filesystem
dquot: cleanup dquot drop routine
dquot: move dquot drop responsibility into the filesystem
dquot: cleanup dquot transfer routine
dquot: move dquot transfer responsibility into the filesystem
dquot: cleanup inode allocation / freeing routines
dquot: cleanup space allocation / freeing routines
ext3: add writepage sanity checks
ext3: Truncate allocated blocks if direct IO write fails to update i_size
quota: Properly invalidate caches even for filesystems with blocksize < pagesize
quota: generalize quota transfer interface
quota: sb_quota state flags cleanup
jbd: Delay discarding buffers in journal_unmap_buffer
ext3: quota_write cross block boundary behaviour
quota: drop permission checks from xfs_fs_set_xstate/xfs_fs_set_xquota
quota: split out compat_sys_quotactl support from quota.c
quota: split out netlink notification support from quota.c
quota: remove invalid optimization from quota_sync_all
...
Fixed trivial conflicts in fs/namei.c and fs/ufs/inode.c
Diffstat (limited to 'fs/jfs/jfs_extent.c')
-rw-r--r-- | fs/jfs/jfs_extent.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/fs/jfs/jfs_extent.c b/fs/jfs/jfs_extent.c index 41d6045dbeb0..5d3bbd10f8db 100644 --- a/fs/jfs/jfs_extent.c +++ b/fs/jfs/jfs_extent.c | |||
@@ -141,10 +141,11 @@ extAlloc(struct inode *ip, s64 xlen, s64 pno, xad_t * xp, bool abnr) | |||
141 | } | 141 | } |
142 | 142 | ||
143 | /* Allocate blocks to quota. */ | 143 | /* Allocate blocks to quota. */ |
144 | if (vfs_dq_alloc_block(ip, nxlen)) { | 144 | rc = dquot_alloc_block(ip, nxlen); |
145 | if (rc) { | ||
145 | dbFree(ip, nxaddr, (s64) nxlen); | 146 | dbFree(ip, nxaddr, (s64) nxlen); |
146 | mutex_unlock(&JFS_IP(ip)->commit_mutex); | 147 | mutex_unlock(&JFS_IP(ip)->commit_mutex); |
147 | return -EDQUOT; | 148 | return rc; |
148 | } | 149 | } |
149 | 150 | ||
150 | /* determine the value of the extent flag */ | 151 | /* determine the value of the extent flag */ |
@@ -164,7 +165,7 @@ extAlloc(struct inode *ip, s64 xlen, s64 pno, xad_t * xp, bool abnr) | |||
164 | */ | 165 | */ |
165 | if (rc) { | 166 | if (rc) { |
166 | dbFree(ip, nxaddr, nxlen); | 167 | dbFree(ip, nxaddr, nxlen); |
167 | vfs_dq_free_block(ip, nxlen); | 168 | dquot_free_block(ip, nxlen); |
168 | mutex_unlock(&JFS_IP(ip)->commit_mutex); | 169 | mutex_unlock(&JFS_IP(ip)->commit_mutex); |
169 | return (rc); | 170 | return (rc); |
170 | } | 171 | } |
@@ -256,10 +257,11 @@ int extRealloc(struct inode *ip, s64 nxlen, xad_t * xp, bool abnr) | |||
256 | goto exit; | 257 | goto exit; |
257 | 258 | ||
258 | /* Allocat blocks to quota. */ | 259 | /* Allocat blocks to quota. */ |
259 | if (vfs_dq_alloc_block(ip, nxlen)) { | 260 | rc = dquot_alloc_block(ip, nxlen); |
261 | if (rc) { | ||
260 | dbFree(ip, nxaddr, (s64) nxlen); | 262 | dbFree(ip, nxaddr, (s64) nxlen); |
261 | mutex_unlock(&JFS_IP(ip)->commit_mutex); | 263 | mutex_unlock(&JFS_IP(ip)->commit_mutex); |
262 | return -EDQUOT; | 264 | return rc; |
263 | } | 265 | } |
264 | 266 | ||
265 | delta = nxlen - xlen; | 267 | delta = nxlen - xlen; |
@@ -297,7 +299,7 @@ int extRealloc(struct inode *ip, s64 nxlen, xad_t * xp, bool abnr) | |||
297 | /* extend the extent */ | 299 | /* extend the extent */ |
298 | if ((rc = xtExtend(0, ip, xoff + xlen, (int) nextend, 0))) { | 300 | if ((rc = xtExtend(0, ip, xoff + xlen, (int) nextend, 0))) { |
299 | dbFree(ip, xaddr + xlen, delta); | 301 | dbFree(ip, xaddr + xlen, delta); |
300 | vfs_dq_free_block(ip, nxlen); | 302 | dquot_free_block(ip, nxlen); |
301 | goto exit; | 303 | goto exit; |
302 | } | 304 | } |
303 | } else { | 305 | } else { |
@@ -308,7 +310,7 @@ int extRealloc(struct inode *ip, s64 nxlen, xad_t * xp, bool abnr) | |||
308 | */ | 310 | */ |
309 | if ((rc = xtTailgate(0, ip, xoff, (int) ntail, nxaddr, 0))) { | 311 | if ((rc = xtTailgate(0, ip, xoff, (int) ntail, nxaddr, 0))) { |
310 | dbFree(ip, nxaddr, nxlen); | 312 | dbFree(ip, nxaddr, nxlen); |
311 | vfs_dq_free_block(ip, nxlen); | 313 | dquot_free_block(ip, nxlen); |
312 | goto exit; | 314 | goto exit; |
313 | } | 315 | } |
314 | } | 316 | } |