Commit 12121714 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] rock: remove CHECK_SP

Remove the CHECK_SP macro.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7fa393a1
...@@ -22,12 +22,21 @@ ...@@ -22,12 +22,21 @@
#define SIG(A,B) ((A) | ((B) << 8)) /* isonum_721() */ #define SIG(A,B) ((A) | ((B) << 8)) /* isonum_721() */
/* This is a way of ensuring that we have something in the system /*
use fields that is compatible with Rock Ridge */ * This is a way of ensuring that we have something in the system
#define CHECK_SP(FAIL) \ * use fields that is compatible with Rock Ridge. Return zero on success.
if(rr->u.SP.magic[0] != 0xbe) FAIL; \ */
if(rr->u.SP.magic[1] != 0xef) FAIL; \
ISOFS_SB(inode->i_sb)->s_rock_offset=rr->u.SP.skip; static int check_sp(struct rock_ridge *rr, struct inode *inode)
{
if (rr->u.SP.magic[0] != 0xbe)
return -1;
if (rr->u.SP.magic[1] != 0xef)
return -1;
ISOFS_SB(inode->i_sb)->s_rock_offset = rr->u.SP.skip;
return 0;
}
/* We define a series of macros because each function must do exactly the /* We define a series of macros because each function must do exactly the
same thing in certain places. We use the macros to ensure that everything same thing in certain places. We use the macros to ensure that everything
is done correctly */ is done correctly */
...@@ -118,7 +127,8 @@ int get_rock_ridge_filename(struct iso_directory_record *de, ...@@ -118,7 +127,8 @@ int get_rock_ridge_filename(struct iso_directory_record *de,
goto out; goto out;
break; break;
case SIG('S', 'P'): case SIG('S', 'P'):
CHECK_SP(goto out); if (check_sp(rr, inode))
goto out;
break; break;
case SIG('C', 'E'): case SIG('C', 'E'):
CHECK_CE; CHECK_CE;
...@@ -212,7 +222,8 @@ parse_rock_ridge_inode_internal(struct iso_directory_record *de, ...@@ -212,7 +222,8 @@ parse_rock_ridge_inode_internal(struct iso_directory_record *de,
break; break;
#endif #endif
case SIG('S', 'P'): case SIG('S', 'P'):
CHECK_SP(goto out); if (check_sp(rr, inode))
goto out;
break; break;
case SIG('C', 'E'): case SIG('C', 'E'):
CHECK_CE; CHECK_CE;
...@@ -570,7 +581,8 @@ static int rock_ridge_symlink_readpage(struct file *file, struct page *page) ...@@ -570,7 +581,8 @@ static int rock_ridge_symlink_readpage(struct file *file, struct page *page)
goto out; goto out;
break; break;
case SIG('S', 'P'): case SIG('S', 'P'):
CHECK_SP(goto out); if (check_sp(rr, inode))
goto out;
break; break;
case SIG('S', 'L'): case SIG('S', 'L'):
rpnt = get_symlink_chunk(rpnt, rr, rpnt = get_symlink_chunk(rpnt, rr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment