[Ocfs2-tools-devel] [PATCH] fswreck: Remove duplicate functions
Sunil Mushran
sunil.mushran at oracle.com
Tue Oct 25 13:58:54 PDT 2011
looks good
On 09/07/2011 01:58 PM, Goldwyn Rodrigues wrote:
> mess_up_dir_ent, mess_up_dir_dot and mess_up_dir_dotdot are
> the same. Remove the duplicates mess_up_dir_dot and mess_up_dir_dotdot
>
> Signed-off-by: Goldwyn Rodrigues<rgoldwyn at suse.de>
> ---
> fswreck/corrupt.c | 10 +++++-----
> fswreck/dir.c | 20 --------------------
> 2 files changed, 5 insertions(+), 25 deletions(-)
>
> diff --git a/fswreck/corrupt.c b/fswreck/corrupt.c
> index aa76dcc..31d9434 100644
> --- a/fswreck/corrupt.c
> +++ b/fswreck/corrupt.c
> @@ -152,19 +152,19 @@ void corrupt_file(ocfs2_filesys *fs, enum
> fsck_type type, uint16_t slotnum)
> func = mess_up_dir_inode;
> break;
> case DIRENT_DOTTY_DUP:
> - func = mess_up_dir_dot;
> + func = mess_up_dir_ent;
> break;
> case DIRENT_NOT_DOTTY:
> - func = mess_up_dir_dot;
> + func = mess_up_dir_ent;
> break;
> case DIRENT_DOT_INODE:
> - func = mess_up_dir_dot;
> + func = mess_up_dir_ent;
> break;
> case DIRENT_DOT_EXCESS:
> - func = mess_up_dir_dot;
> + func = mess_up_dir_ent;
> break;
> case DIR_DOTDOT:
> - func = mess_up_dir_dotdot;
> + func = mess_up_dir_ent;
> break;
> case DIRENT_ZERO:
> func = mess_up_dir_ent;
> diff --git a/fswreck/dir.c b/fswreck/dir.c
> index eb8d0f2..e885a38 100644
> --- a/fswreck/dir.c
> +++ b/fswreck/dir.c
> @@ -393,26 +393,6 @@ static void damage_dir_content(ocfs2_filesys *fs,
> uint64_t dir,
> return;
> }
>
> -void mess_up_dir_dot(ocfs2_filesys *fs, enum fsck_type type, uint64_t blkno)
> -{
> - uint64_t tmp_blkno;
> -
> - create_directory(fs, blkno,&tmp_blkno);
> - damage_dir_content(fs, tmp_blkno, type);
> -
> - return;
> -}
> -
> -void mess_up_dir_dotdot(ocfs2_filesys *fs, enum fsck_type type, uint64_t blkno)
> -{
> - uint64_t tmp_blkno;
> -
> - create_directory(fs, blkno,&tmp_blkno);
> - damage_dir_content(fs, tmp_blkno, type);
> -
> - return;
> -}
> -
> void mess_up_dir_ent(ocfs2_filesys *fs, enum fsck_type type, uint64_t blkno)
> {
> uint64_t tmp_blkno;
More information about the Ocfs2-tools-devel
mailing list