Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ext3: Remove the obsolete broken EXT3_IOC32_WAIT_FOR_READONLY.

There are no user of EXT3_IOC32_WAIT_FOR_READONLY and also it is
broken. No one set the set_ro_timer, no one wake up us and our
state is set to TASK_INTERRUPTIBLE not RUNNING. So remove it.

Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: Jan Kara <jack@suse.cz>

authored by

Tao Ma and committed by
Jan Kara
40bfa16d bc112323

-28
-24
fs/ext3/ioctl.c
··· 150 150 mnt_drop_write(filp->f_path.mnt); 151 151 return err; 152 152 } 153 - #ifdef CONFIG_JBD_DEBUG 154 - case EXT3_IOC_WAIT_FOR_READONLY: 155 - /* 156 - * This is racy - by the time we're woken up and running, 157 - * the superblock could be released. And the module could 158 - * have been unloaded. So sue me. 159 - * 160 - * Returns 1 if it slept, else zero. 161 - */ 162 - { 163 - struct super_block *sb = inode->i_sb; 164 - DECLARE_WAITQUEUE(wait, current); 165 - int ret = 0; 166 - 167 - set_current_state(TASK_INTERRUPTIBLE); 168 - add_wait_queue(&EXT3_SB(sb)->ro_wait_queue, &wait); 169 - if (timer_pending(&EXT3_SB(sb)->turn_ro_timer)) { 170 - schedule(); 171 - ret = 1; 172 - } 173 - remove_wait_queue(&EXT3_SB(sb)->ro_wait_queue, &wait); 174 - return ret; 175 - } 176 - #endif 177 153 case EXT3_IOC_GETRSVSZ: 178 154 if (test_opt(inode->i_sb, RESERVATION) 179 155 && S_ISREG(inode->i_mode)
-4
include/linux/ext3_fs_sb.h
··· 76 76 struct mutex s_resize_lock; 77 77 unsigned long s_commit_interval; 78 78 struct block_device *journal_bdev; 79 - #ifdef CONFIG_JBD_DEBUG 80 - struct timer_list turn_ro_timer; /* For turning read-only (crash simulation) */ 81 - wait_queue_head_t ro_wait_queue; /* For people waiting for the fs to go read-only */ 82 - #endif 83 79 #ifdef CONFIG_QUOTA 84 80 char *s_qf_names[MAXQUOTAS]; /* Names of quota files with journalled quota */ 85 81 int s_jquota_fmt; /* Format of quota to use */