From e295cfcb2907ae4c5df57f5d4ada1ce6f3ae4657 Mon Sep 17 00:00:00 2001 From: Evgeniy Dushistov Date: Fri, 3 Feb 2006 03:04:04 -0800 Subject: [PATCH] ufs: fix oops with `ufs1' type "rm" command, on file system with "ufs1" type cause system hang up. This is, in fact, not so bad as it seems to be, because of after that in "kernel control path" there are 3-4 places which may cause "oops". So the first patch fix oopses, and the second patch fix "kernel hang up". "oops" appears because of reading of group's summary info partly wrong, and access to not first group's summary info cause "oops". Signed-off-by: Evgeniy Dushistov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/ufs_fs.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include/linux/ufs_fs.h') diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h index 7a6babeca25..f26118ea1c5 100644 --- a/include/linux/ufs_fs.h +++ b/include/linux/ufs_fs.h @@ -502,8 +502,7 @@ struct ufs_super_block { /* * Convert cylinder group to base address of its global summary info. */ -#define fs_cs(indx) \ - s_csp[(indx) >> uspi->s_csshift][(indx) & ~uspi->s_csmask] +#define fs_cs(indx) s_csp[(indx)] /* * Cylinder group block for a file system. -- cgit v1.2.3