diff options
author | Jan Kara <jack@suse.cz> | 2010-05-19 10:28:56 -0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2010-05-24 08:10:19 -0400 |
commit | 36350462814739e1f38cba59a6900ebadb08d3bb (patch) | |
tree | 09c1f17c5a264a50028a1ea25f3fd681734d2058 /fs/udf/balloc.c | |
parent | 287a80958cf63fc5c68d5bf6e89a3669dd66234a (diff) |
udf: Remove dead quota code
Quota on UDF is non-functional at least since 2.6.16 (I'm too lazy to
do more archeology) because it does not provide .quota_write and .quota_read
functions and thus quotaon(8) just returns EINVAL. Since nobody complained
for all those years and quota support is not even in UDF standard just nuke
it.
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf/balloc.c')
-rw-r--r-- | fs/udf/balloc.c | 43 |
1 files changed, 2 insertions, 41 deletions
diff --git a/fs/udf/balloc.c b/fs/udf/balloc.c index 9a9378b4eb5a..b608efaa4cee 100644 --- a/fs/udf/balloc.c +++ b/fs/udf/balloc.c | |||
@@ -21,7 +21,6 @@ | |||
21 | 21 | ||
22 | #include "udfdecl.h" | 22 | #include "udfdecl.h" |
23 | 23 | ||
24 | #include <linux/quotaops.h> | ||
25 | #include <linux/buffer_head.h> | 24 | #include <linux/buffer_head.h> |
26 | #include <linux/bitops.h> | 25 | #include <linux/bitops.h> |
27 | 26 | ||
@@ -159,8 +158,6 @@ static void udf_bitmap_free_blocks(struct super_block *sb, | |||
159 | udf_debug("byte=%2x\n", | 158 | udf_debug("byte=%2x\n", |
160 | ((char *)bh->b_data)[(bit + i) >> 3]); | 159 | ((char *)bh->b_data)[(bit + i) >> 3]); |
161 | } else { | 160 | } else { |
162 | if (inode) | ||
163 | dquot_free_block(inode, 1); | ||
164 | udf_add_free_space(sb, sbi->s_partition, 1); | 161 | udf_add_free_space(sb, sbi->s_partition, 1); |
165 | } | 162 | } |
166 | } | 163 | } |
@@ -210,15 +207,8 @@ static int udf_bitmap_prealloc_blocks(struct super_block *sb, | |||
210 | bit = block % (sb->s_blocksize << 3); | 207 | bit = block % (sb->s_blocksize << 3); |
211 | 208 | ||
212 | while (bit < (sb->s_blocksize << 3) && block_count > 0) { | 209 | while (bit < (sb->s_blocksize << 3) && block_count > 0) { |
213 | if (!udf_test_bit(bit, bh->b_data)) | 210 | if (!udf_clear_bit(bit, bh->b_data)) |
214 | goto out; | 211 | goto out; |
215 | else if (dquot_prealloc_block(inode, 1)) | ||
216 | goto out; | ||
217 | else if (!udf_clear_bit(bit, bh->b_data)) { | ||
218 | udf_debug("bit already cleared for block %d\n", bit); | ||
219 | dquot_free_block(inode, 1); | ||
220 | goto out; | ||
221 | } | ||
222 | block_count--; | 212 | block_count--; |
223 | alloc_count++; | 213 | alloc_count++; |
224 | bit++; | 214 | bit++; |
@@ -338,20 +328,6 @@ search_back: | |||
338 | } | 328 | } |
339 | 329 | ||
340 | got_block: | 330 | got_block: |
341 | |||
342 | /* | ||
343 | * Check quota for allocation of this block. | ||
344 | */ | ||
345 | if (inode) { | ||
346 | int ret = dquot_alloc_block(inode, 1); | ||
347 | |||
348 | if (ret) { | ||
349 | mutex_unlock(&sbi->s_alloc_mutex); | ||
350 | *err = ret; | ||
351 | return 0; | ||
352 | } | ||
353 | } | ||
354 | |||
355 | newblock = bit + (block_group << (sb->s_blocksize_bits + 3)) - | 331 | newblock = bit + (block_group << (sb->s_blocksize_bits + 3)) - |
356 | (sizeof(struct spaceBitmapDesc) << 3); | 332 | (sizeof(struct spaceBitmapDesc) << 3); |
357 | 333 | ||
@@ -401,10 +377,6 @@ static void udf_table_free_blocks(struct super_block *sb, | |||
401 | } | 377 | } |
402 | 378 | ||
403 | iinfo = UDF_I(table); | 379 | iinfo = UDF_I(table); |
404 | /* We do this up front - There are some error conditions that | ||
405 | could occure, but.. oh well */ | ||
406 | if (inode) | ||
407 | dquot_free_block(inode, count); | ||
408 | udf_add_free_space(sb, sbi->s_partition, count); | 380 | udf_add_free_space(sb, sbi->s_partition, count); |
409 | 381 | ||
410 | start = bloc->logicalBlockNum + offset; | 382 | start = bloc->logicalBlockNum + offset; |
@@ -649,10 +621,7 @@ static int udf_table_prealloc_blocks(struct super_block *sb, | |||
649 | epos.offset -= adsize; | 621 | epos.offset -= adsize; |
650 | 622 | ||
651 | alloc_count = (elen >> sb->s_blocksize_bits); | 623 | alloc_count = (elen >> sb->s_blocksize_bits); |
652 | if (inode && dquot_prealloc_block(inode, | 624 | if (alloc_count > block_count) { |
653 | alloc_count > block_count ? block_count : alloc_count)) | ||
654 | alloc_count = 0; | ||
655 | else if (alloc_count > block_count) { | ||
656 | alloc_count = block_count; | 625 | alloc_count = block_count; |
657 | eloc.logicalBlockNum += alloc_count; | 626 | eloc.logicalBlockNum += alloc_count; |
658 | elen -= (alloc_count << sb->s_blocksize_bits); | 627 | elen -= (alloc_count << sb->s_blocksize_bits); |
@@ -752,14 +721,6 @@ static int udf_table_new_block(struct super_block *sb, | |||
752 | newblock = goal_eloc.logicalBlockNum; | 721 | newblock = goal_eloc.logicalBlockNum; |
753 | goal_eloc.logicalBlockNum++; | 722 | goal_eloc.logicalBlockNum++; |
754 | goal_elen -= sb->s_blocksize; | 723 | goal_elen -= sb->s_blocksize; |
755 | if (inode) { | ||
756 | *err = dquot_alloc_block(inode, 1); | ||
757 | if (*err) { | ||
758 | brelse(goal_epos.bh); | ||
759 | mutex_unlock(&sbi->s_alloc_mutex); | ||
760 | return 0; | ||
761 | } | ||
762 | } | ||
763 | 724 | ||
764 | if (goal_elen) | 725 | if (goal_elen) |
765 | udf_write_aext(table, &goal_epos, &goal_eloc, goal_elen, 1); | 726 | udf_write_aext(table, &goal_epos, &goal_eloc, goal_elen, 1); |