From: Mingming Cao remove ifdef EXT3_RESERVATION since now we have reservation/noreservation mount options. --- 25-akpm/fs/ext3/balloc.c | 10 ---------- 25-akpm/fs/ext3/ioctl.c | 2 -- 25-akpm/fs/ext3/super.c | 7 ------- 25-akpm/include/linux/ext3_fs.h | 3 --- 4 files changed, 22 deletions(-) diff -puN fs/ext3/balloc.c~ext3-reservation-ifdef-cleanup-patch fs/ext3/balloc.c --- 25/fs/ext3/balloc.c~ext3-reservation-ifdef-cleanup-patch Wed Apr 28 15:12:34 2004 +++ 25-akpm/fs/ext3/balloc.c Wed Apr 28 15:12:34 2004 @@ -999,10 +999,8 @@ int ext3_new_block(handle_t *handle, str sbi = EXT3_SB(sb); es = EXT3_SB(sb)->s_es; ext3_debug("goal=%lu.\n", goal); -#ifdef EXT3_RESERVATION if (test_opt(sb, RESERVATION) && S_ISREG(inode->i_mode)) my_rsv = &EXT3_I(inode)->i_rsv_window; -#endif free_blocks = percpu_counter_read_positive(&sbi->s_freeblocks_counter); root_blocks = le32_to_cpu(es->s_r_blocks_count); if (free_blocks < root_blocks + 1 && !capable(CAP_SYS_RESOURCE) && @@ -1069,7 +1067,6 @@ retry: if (ret_block >= 0) goto allocated; } -#ifdef EXT3_RESERVATION /* * We may end up a bogus ealier ENOSPC error due to * filesystem is "full" of reservations, but @@ -1078,17 +1075,10 @@ retry: * just do block allocation as without reservations. */ if (my_rsv) { -#ifdef EXT3_RESERVATION_DEBUG - printk("filesystem is fully reserved. Actual free blocks: %d. " - "Try to do allocation without reservation, goal_group " - "is %d\n", - free_blocks, goal_group); -#endif my_rsv = NULL; group_no = goal_group; goto retry; } -#endif /* No space left on the device */ *errp = -ENOSPC; goto out; diff -puN fs/ext3/ioctl.c~ext3-reservation-ifdef-cleanup-patch fs/ext3/ioctl.c --- 25/fs/ext3/ioctl.c~ext3-reservation-ifdef-cleanup-patch Wed Apr 28 15:12:34 2004 +++ 25-akpm/fs/ext3/ioctl.c Wed Apr 28 15:12:34 2004 @@ -152,7 +152,6 @@ flags_err: return ret; } #endif -#ifdef EXT3_RESERVATION case EXT3_IOC_GETRSVSZ: rsv_window_size = atomic_read(&ei->i_rsv_window.rsv_goal_size); return put_user(rsv_window_size, (int *)arg); @@ -170,7 +169,6 @@ flags_err: rsv_window_size = EXT3_MAX_RESERVE_BLOCKS; atomic_set(&ei->i_rsv_window.rsv_goal_size, rsv_window_size); return 0; -#endif default: return -ENOTTY; } diff -puN fs/ext3/super.c~ext3-reservation-ifdef-cleanup-patch fs/ext3/super.c --- 25/fs/ext3/super.c~ext3-reservation-ifdef-cleanup-patch Wed Apr 28 15:12:34 2004 +++ 25-akpm/fs/ext3/super.c Wed Apr 28 15:12:34 2004 @@ -770,19 +770,12 @@ static int parse_options (char * options printk("EXT3 (no)acl options not supported\n"); break; #endif -#ifdef EXT3_RESERVATION case Opt_reservation: set_opt(sbi->s_mount_opt, RESERVATION); break; case Opt_noreservation: clear_opt(sbi->s_mount_opt, RESERVATION); break; -#else - case Opt_reservation: - case Opt_noreservation: - printk("EXT3 block reservation options not supported\n"); - break; -#endif case Opt_journal_update: /* @@@ FIXME */ /* Eventually we will want to be able to create diff -puN include/linux/ext3_fs.h~ext3-reservation-ifdef-cleanup-patch include/linux/ext3_fs.h --- 25/include/linux/ext3_fs.h~ext3-reservation-ifdef-cleanup-patch Wed Apr 28 15:12:34 2004 +++ 25-akpm/include/linux/ext3_fs.h Wed Apr 28 15:12:34 2004 @@ -35,7 +35,6 @@ struct statfs; /* * Define EXT3_RESERVATION to reserve data blocks for expanding files */ -#define EXT3_RESERVATION #define EXT3_DEFAULT_RESERVE_BLOCKS 8 #define EXT3_MAX_RESERVE_BLOCKS 1024 /* @@ -208,10 +207,8 @@ struct ext3_group_desc #ifdef CONFIG_JBD_DEBUG #define EXT3_IOC_WAIT_FOR_READONLY _IOR('f', 99, long) #endif -#ifdef EXT3_RESERVATION #define EXT3_IOC_GETRSVSZ _IOR('r', 1, long) #define EXT3_IOC_SETRSVSZ _IOW('r', 2, long) -#endif /* * Structure of an inode on the disk _