aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hpfs/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/hpfs/buffer.c')
-rw-r--r--fs/hpfs/buffer.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/fs/hpfs/buffer.c b/fs/hpfs/buffer.c
index 793cb9d943d2..9ecde27d1e29 100644
--- a/fs/hpfs/buffer.c
+++ b/fs/hpfs/buffer.c
@@ -9,22 +9,6 @@
9#include <linux/slab.h> 9#include <linux/slab.h>
10#include "hpfs_fn.h" 10#include "hpfs_fn.h"
11 11
12void hpfs_lock_creation(struct super_block *s)
13{
14#ifdef DEBUG_LOCKS
15 printk("lock creation\n");
16#endif
17 mutex_lock(&hpfs_sb(s)->hpfs_creation_de);
18}
19
20void hpfs_unlock_creation(struct super_block *s)
21{
22#ifdef DEBUG_LOCKS
23 printk("unlock creation\n");
24#endif
25 mutex_unlock(&hpfs_sb(s)->hpfs_creation_de);
26}
27
28/* Map a sector into a buffer and return pointers to it and to the buffer. */ 12/* Map a sector into a buffer and return pointers to it and to the buffer. */
29 13
30void *hpfs_map_sector(struct super_block *s, unsigned secno, struct buffer_head **bhp, 14void *hpfs_map_sector(struct super_block *s, unsigned secno, struct buffer_head **bhp,
@@ -32,6 +16,8 @@ void *hpfs_map_sector(struct super_block *s, unsigned secno, struct buffer_head
32{ 16{
33 struct buffer_head *bh; 17 struct buffer_head *bh;
34 18
19 hpfs_lock_assert(s);
20
35 cond_resched(); 21 cond_resched();
36 22
37 *bhp = bh = sb_bread(s, secno); 23 *bhp = bh = sb_bread(s, secno);
@@ -50,6 +36,8 @@ void *hpfs_get_sector(struct super_block *s, unsigned secno, struct buffer_head
50 struct buffer_head *bh; 36 struct buffer_head *bh;
51 /*return hpfs_map_sector(s, secno, bhp, 0);*/ 37 /*return hpfs_map_sector(s, secno, bhp, 0);*/
52 38
39 hpfs_lock_assert(s);
40
53 cond_resched(); 41 cond_resched();
54 42
55 if ((*bhp = bh = sb_getblk(s, secno)) != NULL) { 43 if ((*bhp = bh = sb_getblk(s, secno)) != NULL) {
@@ -70,6 +58,8 @@ void *hpfs_map_4sectors(struct super_block *s, unsigned secno, struct quad_buffe
70 struct buffer_head *bh; 58 struct buffer_head *bh;
71 char *data; 59 char *data;
72 60
61 hpfs_lock_assert(s);
62
73 cond_resched(); 63 cond_resched();
74 64
75 if (secno & 3) { 65 if (secno & 3) {
@@ -125,6 +115,8 @@ void *hpfs_get_4sectors(struct super_block *s, unsigned secno,
125{ 115{
126 cond_resched(); 116 cond_resched();
127 117
118 hpfs_lock_assert(s);
119
128 if (secno & 3) { 120 if (secno & 3) {
129 printk("HPFS: hpfs_get_4sectors: unaligned read\n"); 121 printk("HPFS: hpfs_get_4sectors: unaligned read\n");
130 return NULL; 122 return NULL;