summaryrefslogtreecommitdiffstats
path: root/fs/sysv/balloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/sysv/balloc.c')
-rw-r--r--fs/sysv/balloc.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/sysv/balloc.c b/fs/sysv/balloc.c
index 9a6ad96acf27..921c053fc052 100644
--- a/fs/sysv/balloc.c
+++ b/fs/sysv/balloc.c
@@ -60,12 +60,12 @@ void sysv_free_block(struct super_block * sb, sysv_zone_t nr)
60 return; 60 return;
61 } 61 }
62 62
63 lock_super(sb); 63 mutex_lock(&sbi->s_lock);
64 count = fs16_to_cpu(sbi, *sbi->s_bcache_count); 64 count = fs16_to_cpu(sbi, *sbi->s_bcache_count);
65 65
66 if (count > sbi->s_flc_size) { 66 if (count > sbi->s_flc_size) {
67 printk("sysv_free_block: flc_count > flc_size\n"); 67 printk("sysv_free_block: flc_count > flc_size\n");
68 unlock_super(sb); 68 mutex_unlock(&sbi->s_lock);
69 return; 69 return;
70 } 70 }
71 /* If the free list head in super-block is full, it is copied 71 /* If the free list head in super-block is full, it is copied
@@ -77,7 +77,7 @@ void sysv_free_block(struct super_block * sb, sysv_zone_t nr)
77 bh = sb_getblk(sb, block); 77 bh = sb_getblk(sb, block);
78 if (!bh) { 78 if (!bh) {
79 printk("sysv_free_block: getblk() failed\n"); 79 printk("sysv_free_block: getblk() failed\n");
80 unlock_super(sb); 80 mutex_unlock(&sbi->s_lock);
81 return; 81 return;
82 } 82 }
83 memset(bh->b_data, 0, sb->s_blocksize); 83 memset(bh->b_data, 0, sb->s_blocksize);
@@ -93,7 +93,7 @@ void sysv_free_block(struct super_block * sb, sysv_zone_t nr)
93 *sbi->s_bcache_count = cpu_to_fs16(sbi, count); 93 *sbi->s_bcache_count = cpu_to_fs16(sbi, count);
94 fs32_add(sbi, sbi->s_free_blocks, 1); 94 fs32_add(sbi, sbi->s_free_blocks, 1);
95 dirty_sb(sb); 95 dirty_sb(sb);
96 unlock_super(sb); 96 mutex_unlock(&sbi->s_lock);
97} 97}
98 98
99sysv_zone_t sysv_new_block(struct super_block * sb) 99sysv_zone_t sysv_new_block(struct super_block * sb)
@@ -104,7 +104,7 @@ sysv_zone_t sysv_new_block(struct super_block * sb)
104 struct buffer_head * bh; 104 struct buffer_head * bh;
105 unsigned count; 105 unsigned count;
106 106
107 lock_super(sb); 107 mutex_lock(&sbi->s_lock);
108 count = fs16_to_cpu(sbi, *sbi->s_bcache_count); 108 count = fs16_to_cpu(sbi, *sbi->s_bcache_count);
109 109
110 if (count == 0) /* Applies only to Coherent FS */ 110 if (count == 0) /* Applies only to Coherent FS */
@@ -147,11 +147,11 @@ sysv_zone_t sysv_new_block(struct super_block * sb)
147 /* Now the free list head in the superblock is valid again. */ 147 /* Now the free list head in the superblock is valid again. */
148 fs32_add(sbi, sbi->s_free_blocks, -1); 148 fs32_add(sbi, sbi->s_free_blocks, -1);
149 dirty_sb(sb); 149 dirty_sb(sb);
150 unlock_super(sb); 150 mutex_unlock(&sbi->s_lock);
151 return nr; 151 return nr;
152 152
153Enospc: 153Enospc:
154 unlock_super(sb); 154 mutex_unlock(&sbi->s_lock);
155 return 0; 155 return 0;
156} 156}
157 157
@@ -173,7 +173,7 @@ unsigned long sysv_count_free_blocks(struct super_block * sb)
173 if (sbi->s_type == FSTYPE_AFS) 173 if (sbi->s_type == FSTYPE_AFS)
174 return 0; 174 return 0;
175 175
176 lock_super(sb); 176 mutex_lock(&sbi->s_lock);
177 sb_count = fs32_to_cpu(sbi, *sbi->s_free_blocks); 177 sb_count = fs32_to_cpu(sbi, *sbi->s_free_blocks);
178 178
179 if (0) 179 if (0)
@@ -211,7 +211,7 @@ unsigned long sysv_count_free_blocks(struct super_block * sb)
211 if (count != sb_count) 211 if (count != sb_count)
212 goto Ecount; 212 goto Ecount;
213done: 213done:
214 unlock_super(sb); 214 mutex_unlock(&sbi->s_lock);
215 return count; 215 return count;
216 216
217Einval: 217Einval: