[PATCH] ufs: wrong type cast
There are two ugly macros in ufs code: #define UCPI_UBH ((struct ufs_buffer_head *)ucpi) #define USPI_UBH ((struct ufs_buffer_head *)uspi) when uspi looks like struct { struct ufs_buffer_head ; } and USPI_UBH has some sence, ucpi looks like struct { struct not_ufs_buffer_head; } To prevent bugs in future, this patch convert macros to inline function and fix "ucpi" structure. Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
b71034e5e6
commit
9695ef16ed
@@ -225,7 +225,7 @@ void ufs_error (struct super_block * sb, const char * function,
|
||||
|
||||
if (!(sb->s_flags & MS_RDONLY)) {
|
||||
usb1->fs_clean = UFS_FSBAD;
|
||||
ubh_mark_buffer_dirty(USPI_UBH);
|
||||
ubh_mark_buffer_dirty(USPI_UBH(uspi));
|
||||
sb->s_dirt = 1;
|
||||
sb->s_flags |= MS_RDONLY;
|
||||
}
|
||||
@@ -257,7 +257,7 @@ void ufs_panic (struct super_block * sb, const char * function,
|
||||
|
||||
if (!(sb->s_flags & MS_RDONLY)) {
|
||||
usb1->fs_clean = UFS_FSBAD;
|
||||
ubh_mark_buffer_dirty(USPI_UBH);
|
||||
ubh_mark_buffer_dirty(USPI_UBH(uspi));
|
||||
sb->s_dirt = 1;
|
||||
}
|
||||
va_start (args, fmt);
|
||||
@@ -1014,7 +1014,7 @@ static void ufs_write_super (struct super_block *sb) {
|
||||
|| (flags & UFS_ST_MASK) == UFS_ST_SUNx86)
|
||||
ufs_set_fs_state(sb, usb1, usb3,
|
||||
UFS_FSOK - fs32_to_cpu(sb, usb1->fs_time));
|
||||
ubh_mark_buffer_dirty (USPI_UBH);
|
||||
ubh_mark_buffer_dirty (USPI_UBH(uspi));
|
||||
}
|
||||
sb->s_dirt = 0;
|
||||
UFSD(("EXIT\n"))
|
||||
@@ -1083,7 +1083,7 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data)
|
||||
|| (flags & UFS_ST_MASK) == UFS_ST_SUNx86)
|
||||
ufs_set_fs_state(sb, usb1, usb3,
|
||||
UFS_FSOK - fs32_to_cpu(sb, usb1->fs_time));
|
||||
ubh_mark_buffer_dirty (USPI_UBH);
|
||||
ubh_mark_buffer_dirty (USPI_UBH(uspi));
|
||||
sb->s_dirt = 0;
|
||||
sb->s_flags |= MS_RDONLY;
|
||||
}
|
||||
|
Reference in New Issue
Block a user