aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ufs/super.c
diff options
context:
space:
mode:
authorEvgeniy Dushistov <dushistov@mail.ru>2006-06-25 08:47:22 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-25 13:01:02 -0400
commit9695ef16ed4e00b59303f39f9a4a422a2c6a3b89 (patch)
treefba8946e86a523a5d53936cf5ec9e0a150037f73 /fs/ufs/super.c
parentb71034e5e67d1577424cebe7bbb7d0ce134a4cd8 (diff)
[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>
Diffstat (limited to 'fs/ufs/super.c')
-rw-r--r--fs/ufs/super.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index fe5ab2aa2899..c00d1e741529 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -225,7 +225,7 @@ void ufs_error (struct super_block * sb, const char * function,
225 225
226 if (!(sb->s_flags & MS_RDONLY)) { 226 if (!(sb->s_flags & MS_RDONLY)) {
227 usb1->fs_clean = UFS_FSBAD; 227 usb1->fs_clean = UFS_FSBAD;
228 ubh_mark_buffer_dirty(USPI_UBH); 228 ubh_mark_buffer_dirty(USPI_UBH(uspi));
229 sb->s_dirt = 1; 229 sb->s_dirt = 1;
230 sb->s_flags |= MS_RDONLY; 230 sb->s_flags |= MS_RDONLY;
231 } 231 }
@@ -257,7 +257,7 @@ void ufs_panic (struct super_block * sb, const char * function,
257 257
258 if (!(sb->s_flags & MS_RDONLY)) { 258 if (!(sb->s_flags & MS_RDONLY)) {
259 usb1->fs_clean = UFS_FSBAD; 259 usb1->fs_clean = UFS_FSBAD;
260 ubh_mark_buffer_dirty(USPI_UBH); 260 ubh_mark_buffer_dirty(USPI_UBH(uspi));
261 sb->s_dirt = 1; 261 sb->s_dirt = 1;
262 } 262 }
263 va_start (args, fmt); 263 va_start (args, fmt);
@@ -1014,7 +1014,7 @@ static void ufs_write_super (struct super_block *sb) {
1014 || (flags & UFS_ST_MASK) == UFS_ST_SUNx86) 1014 || (flags & UFS_ST_MASK) == UFS_ST_SUNx86)
1015 ufs_set_fs_state(sb, usb1, usb3, 1015 ufs_set_fs_state(sb, usb1, usb3,
1016 UFS_FSOK - fs32_to_cpu(sb, usb1->fs_time)); 1016 UFS_FSOK - fs32_to_cpu(sb, usb1->fs_time));
1017 ubh_mark_buffer_dirty (USPI_UBH); 1017 ubh_mark_buffer_dirty (USPI_UBH(uspi));
1018 } 1018 }
1019 sb->s_dirt = 0; 1019 sb->s_dirt = 0;
1020 UFSD(("EXIT\n")) 1020 UFSD(("EXIT\n"))
@@ -1083,7 +1083,7 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data)
1083 || (flags & UFS_ST_MASK) == UFS_ST_SUNx86) 1083 || (flags & UFS_ST_MASK) == UFS_ST_SUNx86)
1084 ufs_set_fs_state(sb, usb1, usb3, 1084 ufs_set_fs_state(sb, usb1, usb3,
1085 UFS_FSOK - fs32_to_cpu(sb, usb1->fs_time)); 1085 UFS_FSOK - fs32_to_cpu(sb, usb1->fs_time));
1086 ubh_mark_buffer_dirty (USPI_UBH); 1086 ubh_mark_buffer_dirty (USPI_UBH(uspi));
1087 sb->s_dirt = 0; 1087 sb->s_dirt = 0;
1088 sb->s_flags |= MS_RDONLY; 1088 sb->s_flags |= MS_RDONLY;
1089 } 1089 }