mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 21:51:05 +00:00
HPFS: Introduce a global mutex and lock it on every callback from VFS.
Introduce a global mutex and lock it on every callback from VFS. Performance doesn't matter, reviewing the whole code for locking correctness would be too complicated, so simply lock it all. Signed-off-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
637b424bf8
commit
7dd29d8d86
4 changed files with 51 additions and 18 deletions
|
@ -32,6 +32,8 @@ void *hpfs_map_sector(struct super_block *s, unsigned secno, struct buffer_head
|
|||
{
|
||||
struct buffer_head *bh;
|
||||
|
||||
hpfs_lock_assert(s);
|
||||
|
||||
cond_resched();
|
||||
|
||||
*bhp = bh = sb_bread(s, secno);
|
||||
|
@ -50,6 +52,8 @@ void *hpfs_get_sector(struct super_block *s, unsigned secno, struct buffer_head
|
|||
struct buffer_head *bh;
|
||||
/*return hpfs_map_sector(s, secno, bhp, 0);*/
|
||||
|
||||
hpfs_lock_assert(s);
|
||||
|
||||
cond_resched();
|
||||
|
||||
if ((*bhp = bh = sb_getblk(s, secno)) != NULL) {
|
||||
|
@ -70,6 +74,8 @@ void *hpfs_map_4sectors(struct super_block *s, unsigned secno, struct quad_buffe
|
|||
struct buffer_head *bh;
|
||||
char *data;
|
||||
|
||||
hpfs_lock_assert(s);
|
||||
|
||||
cond_resched();
|
||||
|
||||
if (secno & 3) {
|
||||
|
@ -125,6 +131,8 @@ void *hpfs_get_4sectors(struct super_block *s, unsigned secno,
|
|||
{
|
||||
cond_resched();
|
||||
|
||||
hpfs_lock_assert(s);
|
||||
|
||||
if (secno & 3) {
|
||||
printk("HPFS: hpfs_get_4sectors: unaligned read\n");
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue