diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-09 12:07:55 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-09 12:07:55 -0400 |
| commit | 7f4238a0ef8858e1f9b02a874b5818f6e9846673 (patch) | |
| tree | 2a63b6f59b9d0f5cb3665768893caf437077bdef /fs/hpfs/buffer.c | |
| parent | 8b061610dac3a3b89770c85ad63b481a47b0c38e (diff) | |
| parent | 88f4e9e870c01452e57a6943c04c8d62f6a0a7a6 (diff) | |
Merge branch 'hpfs'
* hpfs:
HPFS: Remove unused variable
HPFS: Move declaration up, so that there are no out-of-scope pointers
HPFS: Fix some unaligned accesses
HPFS: Fix endianity. Make hpfs work on big-endian machines
HPFS: Implement fsync for hpfs
HPFS: Fix a bug that filesystem was not marked dirty when remounting it
HPFS: Restrict uid and gid to 16-bit values
HPFS: When marking or clearing the dirty bit, sync the filesystem
HPFS: Use types with defined width
HPFS: Remove mark_inode_dirty
HPFS: Remove CR/LF conversion option
HPFS: Remove remaining locks
HPFS: Introduce a global mutex and lock it on every callback from VFS.
HPFS: Make HPFS compile on preempt and SMP
Diffstat (limited to 'fs/hpfs/buffer.c')
| -rw-r--r-- | fs/hpfs/buffer.c | 24 |
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 | ||
| 12 | void 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 | |||
| 20 | void 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 | ||
| 30 | void *hpfs_map_sector(struct super_block *s, unsigned secno, struct buffer_head **bhp, | 14 | void *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; |
