aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ufs/balloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ufs/balloc.c')
-rw-r--r--fs/ufs/balloc.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/fs/ufs/balloc.c b/fs/ufs/balloc.c
index faf1512173eb..3ada9dcf55b8 100644
--- a/fs/ufs/balloc.c
+++ b/fs/ufs/balloc.c
@@ -13,6 +13,7 @@
13#include <linux/string.h> 13#include <linux/string.h>
14#include <linux/quotaops.h> 14#include <linux/quotaops.h>
15#include <linux/buffer_head.h> 15#include <linux/buffer_head.h>
16#include <linux/capability.h>
16#include <linux/sched.h> 17#include <linux/sched.h>
17#include <linux/bitops.h> 18#include <linux/bitops.h>
18#include <asm/byteorder.h> 19#include <asm/byteorder.h>
@@ -48,7 +49,7 @@ void ufs_free_fragments (struct inode * inode, unsigned fragment, unsigned count
48 49
49 sb = inode->i_sb; 50 sb = inode->i_sb;
50 uspi = UFS_SB(sb)->s_uspi; 51 uspi = UFS_SB(sb)->s_uspi;
51 usb1 = ubh_get_usb_first(USPI_UBH); 52 usb1 = ubh_get_usb_first(uspi);
52 53
53 UFSD(("ENTER, fragment %u, count %u\n", fragment, count)) 54 UFSD(("ENTER, fragment %u, count %u\n", fragment, count))
54 55
@@ -80,8 +81,9 @@ void ufs_free_fragments (struct inode * inode, unsigned fragment, unsigned count
80 for (i = bit; i < end_bit; i++) { 81 for (i = bit; i < end_bit; i++) {
81 if (ubh_isclr (UCPI_UBH, ucpi->c_freeoff, i)) 82 if (ubh_isclr (UCPI_UBH, ucpi->c_freeoff, i))
82 ubh_setbit (UCPI_UBH, ucpi->c_freeoff, i); 83 ubh_setbit (UCPI_UBH, ucpi->c_freeoff, i);
83 else ufs_error (sb, "ufs_free_fragments", 84 else
84 "bit already cleared for fragment %u", i); 85 ufs_error (sb, "ufs_free_fragments",
86 "bit already cleared for fragment %u", i);
85 } 87 }
86 88
87 DQUOT_FREE_BLOCK (inode, count); 89 DQUOT_FREE_BLOCK (inode, count);
@@ -142,7 +144,7 @@ void ufs_free_blocks (struct inode * inode, unsigned fragment, unsigned count) {
142 144
143 sb = inode->i_sb; 145 sb = inode->i_sb;
144 uspi = UFS_SB(sb)->s_uspi; 146 uspi = UFS_SB(sb)->s_uspi;
145 usb1 = ubh_get_usb_first(USPI_UBH); 147 usb1 = ubh_get_usb_first(uspi);
146 148
147 UFSD(("ENTER, fragment %u, count %u\n", fragment, count)) 149 UFSD(("ENTER, fragment %u, count %u\n", fragment, count))
148 150
@@ -246,7 +248,7 @@ unsigned ufs_new_fragments (struct inode * inode, __fs32 * p, unsigned fragment,
246 248
247 sb = inode->i_sb; 249 sb = inode->i_sb;
248 uspi = UFS_SB(sb)->s_uspi; 250 uspi = UFS_SB(sb)->s_uspi;
249 usb1 = ubh_get_usb_first(USPI_UBH); 251 usb1 = ubh_get_usb_first(uspi);
250 *err = -ENOSPC; 252 *err = -ENOSPC;
251 253
252 lock_super (sb); 254 lock_super (sb);
@@ -406,7 +408,7 @@ ufs_add_fragments (struct inode * inode, unsigned fragment,
406 408
407 sb = inode->i_sb; 409 sb = inode->i_sb;
408 uspi = UFS_SB(sb)->s_uspi; 410 uspi = UFS_SB(sb)->s_uspi;
409 usb1 = ubh_get_usb_first (USPI_UBH); 411 usb1 = ubh_get_usb_first (uspi);
410 count = newcount - oldcount; 412 count = newcount - oldcount;
411 413
412 cgno = ufs_dtog(fragment); 414 cgno = ufs_dtog(fragment);
@@ -489,7 +491,7 @@ static unsigned ufs_alloc_fragments (struct inode * inode, unsigned cgno,
489 491
490 sb = inode->i_sb; 492 sb = inode->i_sb;
491 uspi = UFS_SB(sb)->s_uspi; 493 uspi = UFS_SB(sb)->s_uspi;
492 usb1 = ubh_get_usb_first(USPI_UBH); 494 usb1 = ubh_get_usb_first(uspi);
493 oldcg = cgno; 495 oldcg = cgno;
494 496
495 /* 497 /*
@@ -605,7 +607,7 @@ static unsigned ufs_alloccg_block (struct inode * inode,
605 607
606 sb = inode->i_sb; 608 sb = inode->i_sb;
607 uspi = UFS_SB(sb)->s_uspi; 609 uspi = UFS_SB(sb)->s_uspi;
608 usb1 = ubh_get_usb_first(USPI_UBH); 610 usb1 = ubh_get_usb_first(uspi);
609 ucg = ubh_get_ucg(UCPI_UBH); 611 ucg = ubh_get_ucg(UCPI_UBH);
610 612
611 if (goal == 0) { 613 if (goal == 0) {
@@ -662,7 +664,7 @@ static unsigned ufs_bitmap_search (struct super_block * sb,
662 UFSD(("ENTER, cg %u, goal %u, count %u\n", ucpi->c_cgx, goal, count)) 664 UFSD(("ENTER, cg %u, goal %u, count %u\n", ucpi->c_cgx, goal, count))
663 665
664 uspi = UFS_SB(sb)->s_uspi; 666 uspi = UFS_SB(sb)->s_uspi;
665 usb1 = ubh_get_usb_first (USPI_UBH); 667 usb1 = ubh_get_usb_first (uspi);
666 ucg = ubh_get_ucg(UCPI_UBH); 668 ucg = ubh_get_ucg(UCPI_UBH);
667 669
668 if (goal) 670 if (goal)