Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * linux/fs/ext3/ioctl.c |
| 3 | * |
| 4 | * Copyright (C) 1993, 1994, 1995 |
| 5 | * Remy Card (card@masi.ibp.fr) |
| 6 | * Laboratoire MASI - Institut Blaise Pascal |
| 7 | * Universite Pierre et Marie Curie (Paris VI) |
| 8 | */ |
| 9 | |
| 10 | #include <linux/fs.h> |
| 11 | #include <linux/jbd.h> |
Randy Dunlap | 16f7e0f | 2006-01-11 12:17:46 -0800 | [diff] [blame] | 12 | #include <linux/capability.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | #include <linux/ext3_fs.h> |
| 14 | #include <linux/ext3_jbd.h> |
Dave Hansen | 42a74f2 | 2008-02-15 14:37:46 -0800 | [diff] [blame] | 15 | #include <linux/mount.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | #include <linux/time.h> |
David Howells | 52a700c | 2006-08-29 19:06:23 +0100 | [diff] [blame] | 17 | #include <linux/compat.h> |
| 18 | #include <linux/smp_lock.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 19 | #include <asm/uaccess.h> |
| 20 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | int ext3_ioctl (struct inode * inode, struct file * filp, unsigned int cmd, |
| 22 | unsigned long arg) |
| 23 | { |
| 24 | struct ext3_inode_info *ei = EXT3_I(inode); |
| 25 | unsigned int flags; |
| 26 | unsigned short rsv_window_size; |
| 27 | |
| 28 | ext3_debug ("cmd = %u, arg = %lu\n", cmd, arg); |
| 29 | |
| 30 | switch (cmd) { |
| 31 | case EXT3_IOC_GETFLAGS: |
Jan Kara | 28be5ab | 2007-05-08 00:30:33 -0700 | [diff] [blame] | 32 | ext3_get_inode_flags(ei); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 33 | flags = ei->i_flags & EXT3_FL_USER_VISIBLE; |
| 34 | return put_user(flags, (int __user *) arg); |
| 35 | case EXT3_IOC_SETFLAGS: { |
| 36 | handle_t *handle = NULL; |
| 37 | int err; |
| 38 | struct ext3_iloc iloc; |
| 39 | unsigned int oldflags; |
| 40 | unsigned int jflag; |
| 41 | |
Dave Hansen | 42a74f2 | 2008-02-15 14:37:46 -0800 | [diff] [blame] | 42 | err = mnt_want_write(filp->f_path.mnt); |
| 43 | if (err) |
| 44 | return err; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 45 | |
Dave Hansen | 42a74f2 | 2008-02-15 14:37:46 -0800 | [diff] [blame] | 46 | if (!is_owner_or_cap(inode)) { |
| 47 | err = -EACCES; |
| 48 | goto flags_out; |
| 49 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 50 | |
Dave Hansen | 42a74f2 | 2008-02-15 14:37:46 -0800 | [diff] [blame] | 51 | if (get_user(flags, (int __user *) arg)) { |
| 52 | err = -EFAULT; |
| 53 | goto flags_out; |
| 54 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 55 | |
| 56 | if (!S_ISDIR(inode->i_mode)) |
| 57 | flags &= ~EXT3_DIRSYNC_FL; |
| 58 | |
Al Viro | a090d91 | 2006-04-26 07:32:40 +0100 | [diff] [blame] | 59 | mutex_lock(&inode->i_mutex); |
Jan Kara | e47776a | 2007-11-14 16:58:56 -0800 | [diff] [blame] | 60 | /* Is it quota file? Do not allow user to mess with it */ |
| 61 | if (IS_NOQUOTA(inode)) { |
| 62 | mutex_unlock(&inode->i_mutex); |
Dave Hansen | 42a74f2 | 2008-02-15 14:37:46 -0800 | [diff] [blame] | 63 | err = -EPERM; |
| 64 | goto flags_out; |
Jan Kara | e47776a | 2007-11-14 16:58:56 -0800 | [diff] [blame] | 65 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 66 | oldflags = ei->i_flags; |
| 67 | |
| 68 | /* The JOURNAL_DATA flag is modifiable only by root */ |
| 69 | jflag = flags & EXT3_JOURNAL_DATA_FL; |
| 70 | |
| 71 | /* |
| 72 | * The IMMUTABLE and APPEND_ONLY flags can only be changed by |
| 73 | * the relevant capability. |
| 74 | * |
| 75 | * This test looks nicer. Thanks to Pauline Middelink |
| 76 | */ |
| 77 | if ((flags ^ oldflags) & (EXT3_APPEND_FL | EXT3_IMMUTABLE_FL)) { |
Al Viro | a090d91 | 2006-04-26 07:32:40 +0100 | [diff] [blame] | 78 | if (!capable(CAP_LINUX_IMMUTABLE)) { |
| 79 | mutex_unlock(&inode->i_mutex); |
Dave Hansen | 42a74f2 | 2008-02-15 14:37:46 -0800 | [diff] [blame] | 80 | err = -EPERM; |
| 81 | goto flags_out; |
Al Viro | a090d91 | 2006-04-26 07:32:40 +0100 | [diff] [blame] | 82 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 83 | } |
| 84 | |
| 85 | /* |
| 86 | * The JOURNAL_DATA flag can only be changed by |
| 87 | * the relevant capability. |
| 88 | */ |
| 89 | if ((jflag ^ oldflags) & (EXT3_JOURNAL_DATA_FL)) { |
Al Viro | a090d91 | 2006-04-26 07:32:40 +0100 | [diff] [blame] | 90 | if (!capable(CAP_SYS_RESOURCE)) { |
| 91 | mutex_unlock(&inode->i_mutex); |
Dave Hansen | 42a74f2 | 2008-02-15 14:37:46 -0800 | [diff] [blame] | 92 | err = -EPERM; |
| 93 | goto flags_out; |
Al Viro | a090d91 | 2006-04-26 07:32:40 +0100 | [diff] [blame] | 94 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 95 | } |
| 96 | |
| 97 | |
| 98 | handle = ext3_journal_start(inode, 1); |
Al Viro | a090d91 | 2006-04-26 07:32:40 +0100 | [diff] [blame] | 99 | if (IS_ERR(handle)) { |
| 100 | mutex_unlock(&inode->i_mutex); |
Dave Hansen | 42a74f2 | 2008-02-15 14:37:46 -0800 | [diff] [blame] | 101 | err = PTR_ERR(handle); |
| 102 | goto flags_out; |
Al Viro | a090d91 | 2006-04-26 07:32:40 +0100 | [diff] [blame] | 103 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 104 | if (IS_SYNC(inode)) |
| 105 | handle->h_sync = 1; |
| 106 | err = ext3_reserve_inode_write(handle, inode, &iloc); |
| 107 | if (err) |
| 108 | goto flags_err; |
| 109 | |
| 110 | flags = flags & EXT3_FL_USER_MODIFIABLE; |
| 111 | flags |= oldflags & ~EXT3_FL_USER_MODIFIABLE; |
| 112 | ei->i_flags = flags; |
| 113 | |
| 114 | ext3_set_inode_flags(inode); |
| 115 | inode->i_ctime = CURRENT_TIME_SEC; |
| 116 | |
| 117 | err = ext3_mark_iloc_dirty(handle, inode, &iloc); |
| 118 | flags_err: |
| 119 | ext3_journal_stop(handle); |
Al Viro | a090d91 | 2006-04-26 07:32:40 +0100 | [diff] [blame] | 120 | if (err) { |
| 121 | mutex_unlock(&inode->i_mutex); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 122 | return err; |
Al Viro | a090d91 | 2006-04-26 07:32:40 +0100 | [diff] [blame] | 123 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 124 | |
| 125 | if ((jflag ^ oldflags) & (EXT3_JOURNAL_DATA_FL)) |
| 126 | err = ext3_change_inode_journal_flag(inode, jflag); |
Al Viro | a090d91 | 2006-04-26 07:32:40 +0100 | [diff] [blame] | 127 | mutex_unlock(&inode->i_mutex); |
Dave Hansen | 42a74f2 | 2008-02-15 14:37:46 -0800 | [diff] [blame] | 128 | flags_out: |
| 129 | mnt_drop_write(filp->f_path.mnt); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 130 | return err; |
| 131 | } |
| 132 | case EXT3_IOC_GETVERSION: |
| 133 | case EXT3_IOC_GETVERSION_OLD: |
| 134 | return put_user(inode->i_generation, (int __user *) arg); |
| 135 | case EXT3_IOC_SETVERSION: |
| 136 | case EXT3_IOC_SETVERSION_OLD: { |
| 137 | handle_t *handle; |
| 138 | struct ext3_iloc iloc; |
| 139 | __u32 generation; |
| 140 | int err; |
| 141 | |
Satyam Sharma | 3bd858a | 2007-07-17 15:00:08 +0530 | [diff] [blame] | 142 | if (!is_owner_or_cap(inode)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 143 | return -EPERM; |
Dave Hansen | 42a74f2 | 2008-02-15 14:37:46 -0800 | [diff] [blame] | 144 | err = mnt_want_write(filp->f_path.mnt); |
| 145 | if (err) |
| 146 | return err; |
| 147 | if (get_user(generation, (int __user *) arg)) { |
| 148 | err = -EFAULT; |
| 149 | goto setversion_out; |
| 150 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 151 | handle = ext3_journal_start(inode, 1); |
Dave Hansen | 42a74f2 | 2008-02-15 14:37:46 -0800 | [diff] [blame] | 152 | if (IS_ERR(handle)) { |
| 153 | err = PTR_ERR(handle); |
| 154 | goto setversion_out; |
| 155 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 156 | err = ext3_reserve_inode_write(handle, inode, &iloc); |
| 157 | if (err == 0) { |
| 158 | inode->i_ctime = CURRENT_TIME_SEC; |
| 159 | inode->i_generation = generation; |
| 160 | err = ext3_mark_iloc_dirty(handle, inode, &iloc); |
| 161 | } |
| 162 | ext3_journal_stop(handle); |
Dave Hansen | 42a74f2 | 2008-02-15 14:37:46 -0800 | [diff] [blame] | 163 | setversion_out: |
| 164 | mnt_drop_write(filp->f_path.mnt); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 165 | return err; |
| 166 | } |
| 167 | #ifdef CONFIG_JBD_DEBUG |
| 168 | case EXT3_IOC_WAIT_FOR_READONLY: |
| 169 | /* |
| 170 | * This is racy - by the time we're woken up and running, |
| 171 | * the superblock could be released. And the module could |
| 172 | * have been unloaded. So sue me. |
| 173 | * |
| 174 | * Returns 1 if it slept, else zero. |
| 175 | */ |
| 176 | { |
| 177 | struct super_block *sb = inode->i_sb; |
| 178 | DECLARE_WAITQUEUE(wait, current); |
| 179 | int ret = 0; |
| 180 | |
| 181 | set_current_state(TASK_INTERRUPTIBLE); |
| 182 | add_wait_queue(&EXT3_SB(sb)->ro_wait_queue, &wait); |
| 183 | if (timer_pending(&EXT3_SB(sb)->turn_ro_timer)) { |
| 184 | schedule(); |
| 185 | ret = 1; |
| 186 | } |
| 187 | remove_wait_queue(&EXT3_SB(sb)->ro_wait_queue, &wait); |
| 188 | return ret; |
| 189 | } |
| 190 | #endif |
| 191 | case EXT3_IOC_GETRSVSZ: |
| 192 | if (test_opt(inode->i_sb, RESERVATION) |
| 193 | && S_ISREG(inode->i_mode) |
| 194 | && ei->i_block_alloc_info) { |
| 195 | rsv_window_size = ei->i_block_alloc_info->rsv_window_node.rsv_goal_size; |
| 196 | return put_user(rsv_window_size, (int __user *)arg); |
| 197 | } |
| 198 | return -ENOTTY; |
| 199 | case EXT3_IOC_SETRSVSZ: { |
Dave Hansen | 42a74f2 | 2008-02-15 14:37:46 -0800 | [diff] [blame] | 200 | int err; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 201 | |
| 202 | if (!test_opt(inode->i_sb, RESERVATION) ||!S_ISREG(inode->i_mode)) |
| 203 | return -ENOTTY; |
| 204 | |
Dave Hansen | 42a74f2 | 2008-02-15 14:37:46 -0800 | [diff] [blame] | 205 | err = mnt_want_write(filp->f_path.mnt); |
| 206 | if (err) |
| 207 | return err; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 208 | |
Dave Hansen | 42a74f2 | 2008-02-15 14:37:46 -0800 | [diff] [blame] | 209 | if (!is_owner_or_cap(inode)) { |
| 210 | err = -EACCES; |
| 211 | goto setrsvsz_out; |
| 212 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 213 | |
Dave Hansen | 42a74f2 | 2008-02-15 14:37:46 -0800 | [diff] [blame] | 214 | if (get_user(rsv_window_size, (int __user *)arg)) { |
| 215 | err = -EFAULT; |
| 216 | goto setrsvsz_out; |
| 217 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 218 | |
| 219 | if (rsv_window_size > EXT3_MAX_RESERVE_BLOCKS) |
| 220 | rsv_window_size = EXT3_MAX_RESERVE_BLOCKS; |
| 221 | |
| 222 | /* |
| 223 | * need to allocate reservation structure for this inode |
| 224 | * before set the window size |
| 225 | */ |
Arjan van de Ven | 9746151 | 2006-03-23 03:00:42 -0800 | [diff] [blame] | 226 | mutex_lock(&ei->truncate_mutex); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 227 | if (!ei->i_block_alloc_info) |
| 228 | ext3_init_block_alloc_info(inode); |
| 229 | |
| 230 | if (ei->i_block_alloc_info){ |
| 231 | struct ext3_reserve_window_node *rsv = &ei->i_block_alloc_info->rsv_window_node; |
| 232 | rsv->rsv_goal_size = rsv_window_size; |
| 233 | } |
Arjan van de Ven | 9746151 | 2006-03-23 03:00:42 -0800 | [diff] [blame] | 234 | mutex_unlock(&ei->truncate_mutex); |
Dave Hansen | 42a74f2 | 2008-02-15 14:37:46 -0800 | [diff] [blame] | 235 | setrsvsz_out: |
| 236 | mnt_drop_write(filp->f_path.mnt); |
| 237 | return err; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 238 | } |
| 239 | case EXT3_IOC_GROUP_EXTEND: { |
Mingming Cao | 43d23f9 | 2006-06-25 05:48:07 -0700 | [diff] [blame] | 240 | ext3_fsblk_t n_blocks_count; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 241 | struct super_block *sb = inode->i_sb; |
Hidehiro Kawai | 2d7c820 | 2008-10-22 14:15:01 -0700 | [diff] [blame] | 242 | int err, err2; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 243 | |
| 244 | if (!capable(CAP_SYS_RESOURCE)) |
| 245 | return -EPERM; |
| 246 | |
Dave Hansen | 42a74f2 | 2008-02-15 14:37:46 -0800 | [diff] [blame] | 247 | err = mnt_want_write(filp->f_path.mnt); |
| 248 | if (err) |
| 249 | return err; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 250 | |
Dave Hansen | 42a74f2 | 2008-02-15 14:37:46 -0800 | [diff] [blame] | 251 | if (get_user(n_blocks_count, (__u32 __user *)arg)) { |
| 252 | err = -EFAULT; |
| 253 | goto group_extend_out; |
| 254 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 255 | err = ext3_group_extend(sb, EXT3_SB(sb)->s_es, n_blocks_count); |
| 256 | journal_lock_updates(EXT3_SB(sb)->s_journal); |
Hidehiro Kawai | 2d7c820 | 2008-10-22 14:15:01 -0700 | [diff] [blame] | 257 | err2 = journal_flush(EXT3_SB(sb)->s_journal); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 258 | journal_unlock_updates(EXT3_SB(sb)->s_journal); |
Hidehiro Kawai | 2d7c820 | 2008-10-22 14:15:01 -0700 | [diff] [blame] | 259 | if (err == 0) |
| 260 | err = err2; |
Dave Hansen | 42a74f2 | 2008-02-15 14:37:46 -0800 | [diff] [blame] | 261 | group_extend_out: |
| 262 | mnt_drop_write(filp->f_path.mnt); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 263 | return err; |
| 264 | } |
| 265 | case EXT3_IOC_GROUP_ADD: { |
| 266 | struct ext3_new_group_data input; |
| 267 | struct super_block *sb = inode->i_sb; |
Hidehiro Kawai | 2d7c820 | 2008-10-22 14:15:01 -0700 | [diff] [blame] | 268 | int err, err2; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 269 | |
| 270 | if (!capable(CAP_SYS_RESOURCE)) |
| 271 | return -EPERM; |
| 272 | |
Dave Hansen | 42a74f2 | 2008-02-15 14:37:46 -0800 | [diff] [blame] | 273 | err = mnt_want_write(filp->f_path.mnt); |
| 274 | if (err) |
| 275 | return err; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 276 | |
| 277 | if (copy_from_user(&input, (struct ext3_new_group_input __user *)arg, |
Dave Hansen | 42a74f2 | 2008-02-15 14:37:46 -0800 | [diff] [blame] | 278 | sizeof(input))) { |
| 279 | err = -EFAULT; |
| 280 | goto group_add_out; |
| 281 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 282 | |
| 283 | err = ext3_group_add(sb, &input); |
| 284 | journal_lock_updates(EXT3_SB(sb)->s_journal); |
Hidehiro Kawai | 2d7c820 | 2008-10-22 14:15:01 -0700 | [diff] [blame] | 285 | err2 = journal_flush(EXT3_SB(sb)->s_journal); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 286 | journal_unlock_updates(EXT3_SB(sb)->s_journal); |
Hidehiro Kawai | 2d7c820 | 2008-10-22 14:15:01 -0700 | [diff] [blame] | 287 | if (err == 0) |
| 288 | err = err2; |
Dave Hansen | 42a74f2 | 2008-02-15 14:37:46 -0800 | [diff] [blame] | 289 | group_add_out: |
| 290 | mnt_drop_write(filp->f_path.mnt); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 291 | return err; |
| 292 | } |
| 293 | |
| 294 | |
| 295 | default: |
| 296 | return -ENOTTY; |
| 297 | } |
| 298 | } |
David Howells | 52a700c | 2006-08-29 19:06:23 +0100 | [diff] [blame] | 299 | |
| 300 | #ifdef CONFIG_COMPAT |
| 301 | long ext3_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
| 302 | { |
Josef "Jeff" Sipek | fe21a69 | 2006-12-08 02:36:38 -0800 | [diff] [blame] | 303 | struct inode *inode = file->f_path.dentry->d_inode; |
David Howells | 52a700c | 2006-08-29 19:06:23 +0100 | [diff] [blame] | 304 | int ret; |
| 305 | |
| 306 | /* These are just misnamed, they actually get/put from/to user an int */ |
| 307 | switch (cmd) { |
| 308 | case EXT3_IOC32_GETFLAGS: |
| 309 | cmd = EXT3_IOC_GETFLAGS; |
| 310 | break; |
| 311 | case EXT3_IOC32_SETFLAGS: |
| 312 | cmd = EXT3_IOC_SETFLAGS; |
| 313 | break; |
| 314 | case EXT3_IOC32_GETVERSION: |
| 315 | cmd = EXT3_IOC_GETVERSION; |
| 316 | break; |
| 317 | case EXT3_IOC32_SETVERSION: |
| 318 | cmd = EXT3_IOC_SETVERSION; |
| 319 | break; |
| 320 | case EXT3_IOC32_GROUP_EXTEND: |
| 321 | cmd = EXT3_IOC_GROUP_EXTEND; |
| 322 | break; |
| 323 | case EXT3_IOC32_GETVERSION_OLD: |
| 324 | cmd = EXT3_IOC_GETVERSION_OLD; |
| 325 | break; |
| 326 | case EXT3_IOC32_SETVERSION_OLD: |
| 327 | cmd = EXT3_IOC_SETVERSION_OLD; |
| 328 | break; |
| 329 | #ifdef CONFIG_JBD_DEBUG |
| 330 | case EXT3_IOC32_WAIT_FOR_READONLY: |
| 331 | cmd = EXT3_IOC_WAIT_FOR_READONLY; |
| 332 | break; |
| 333 | #endif |
| 334 | case EXT3_IOC32_GETRSVSZ: |
| 335 | cmd = EXT3_IOC_GETRSVSZ; |
| 336 | break; |
| 337 | case EXT3_IOC32_SETRSVSZ: |
| 338 | cmd = EXT3_IOC_SETRSVSZ; |
| 339 | break; |
| 340 | case EXT3_IOC_GROUP_ADD: |
| 341 | break; |
| 342 | default: |
| 343 | return -ENOIOCTLCMD; |
| 344 | } |
| 345 | lock_kernel(); |
| 346 | ret = ext3_ioctl(inode, file, cmd, (unsigned long) compat_ptr(arg)); |
| 347 | unlock_kernel(); |
| 348 | return ret; |
| 349 | } |
| 350 | #endif |