aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/compat_ioctl.c52
-rw-r--r--fs/jffs2/scan.c4
2 files changed, 2 insertions, 54 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index c5ded5ff72b5..c135202c38b3 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -94,7 +94,6 @@
94#include <linux/atm_tcp.h> 94#include <linux/atm_tcp.h>
95#include <linux/sonet.h> 95#include <linux/sonet.h>
96#include <linux/atm_suni.h> 96#include <linux/atm_suni.h>
97#include <linux/mtd/mtd.h>
98 97
99#include <linux/usb.h> 98#include <linux/usb.h>
100#include <linux/usbdevice_fs.h> 99#include <linux/usbdevice_fs.h>
@@ -1405,46 +1404,6 @@ static int ioc_settimeout(unsigned int fd, unsigned int cmd, unsigned long arg)
1405#define HIDPGETCONNLIST _IOR('H', 210, int) 1404#define HIDPGETCONNLIST _IOR('H', 210, int)
1406#define HIDPGETCONNINFO _IOR('H', 211, int) 1405#define HIDPGETCONNINFO _IOR('H', 211, int)
1407 1406
1408struct mtd_oob_buf32 {
1409 u_int32_t start;
1410 u_int32_t length;
1411 compat_caddr_t ptr; /* unsigned char* */
1412};
1413
1414#define MEMWRITEOOB32 _IOWR('M',3,struct mtd_oob_buf32)
1415#define MEMREADOOB32 _IOWR('M',4,struct mtd_oob_buf32)
1416
1417static int mtd_rw_oob(unsigned int fd, unsigned int cmd, unsigned long arg)
1418{
1419 struct mtd_oob_buf __user *buf = compat_alloc_user_space(sizeof(*buf));
1420 struct mtd_oob_buf32 __user *buf32 = compat_ptr(arg);
1421 u32 data;
1422 char __user *datap;
1423 unsigned int real_cmd;
1424 int err;
1425
1426 real_cmd = (cmd == MEMREADOOB32) ?
1427 MEMREADOOB : MEMWRITEOOB;
1428
1429 if (copy_in_user(&buf->start, &buf32->start,
1430 2 * sizeof(u32)) ||
1431 get_user(data, &buf32->ptr))
1432 return -EFAULT;
1433 datap = compat_ptr(data);
1434 if (put_user(datap, &buf->ptr))
1435 return -EFAULT;
1436
1437 err = sys_ioctl(fd, real_cmd, (unsigned long) buf);
1438
1439 if (!err) {
1440 if (copy_in_user(&buf32->start, &buf->start,
1441 2 * sizeof(u32)))
1442 err = -EFAULT;
1443 }
1444
1445 return err;
1446}
1447
1448#ifdef CONFIG_BLOCK 1407#ifdef CONFIG_BLOCK
1449struct raw32_config_request 1408struct raw32_config_request
1450{ 1409{
@@ -2426,15 +2385,6 @@ COMPATIBLE_IOCTL(USBDEVFS_SUBMITURB32)
2426COMPATIBLE_IOCTL(USBDEVFS_REAPURB32) 2385COMPATIBLE_IOCTL(USBDEVFS_REAPURB32)
2427COMPATIBLE_IOCTL(USBDEVFS_REAPURBNDELAY32) 2386COMPATIBLE_IOCTL(USBDEVFS_REAPURBNDELAY32)
2428COMPATIBLE_IOCTL(USBDEVFS_CLEAR_HALT) 2387COMPATIBLE_IOCTL(USBDEVFS_CLEAR_HALT)
2429/* MTD */
2430COMPATIBLE_IOCTL(MEMGETINFO)
2431COMPATIBLE_IOCTL(MEMERASE)
2432COMPATIBLE_IOCTL(MEMLOCK)
2433COMPATIBLE_IOCTL(MEMUNLOCK)
2434COMPATIBLE_IOCTL(MEMGETREGIONCOUNT)
2435COMPATIBLE_IOCTL(MEMGETREGIONINFO)
2436COMPATIBLE_IOCTL(MEMGETBADBLOCK)
2437COMPATIBLE_IOCTL(MEMSETBADBLOCK)
2438/* NBD */ 2388/* NBD */
2439ULONG_IOCTL(NBD_SET_SOCK) 2389ULONG_IOCTL(NBD_SET_SOCK)
2440ULONG_IOCTL(NBD_SET_BLKSIZE) 2390ULONG_IOCTL(NBD_SET_BLKSIZE)
@@ -2544,8 +2494,6 @@ COMPATIBLE_IOCTL(JSIOCGBUTTONS)
2544COMPATIBLE_IOCTL(JSIOCGNAME(0)) 2494COMPATIBLE_IOCTL(JSIOCGNAME(0))
2545 2495
2546/* now things that need handlers */ 2496/* now things that need handlers */
2547HANDLE_IOCTL(MEMREADOOB32, mtd_rw_oob)
2548HANDLE_IOCTL(MEMWRITEOOB32, mtd_rw_oob)
2549#ifdef CONFIG_NET 2497#ifdef CONFIG_NET
2550HANDLE_IOCTL(SIOCGIFNAME, dev_ifname32) 2498HANDLE_IOCTL(SIOCGIFNAME, dev_ifname32)
2551HANDLE_IOCTL(SIOCGIFCONF, dev_ifconf) 2499HANDLE_IOCTL(SIOCGIFCONF, dev_ifconf)
diff --git a/fs/jffs2/scan.c b/fs/jffs2/scan.c
index 1d437de1e9a8..7515e73e2bfb 100644
--- a/fs/jffs2/scan.c
+++ b/fs/jffs2/scan.c
@@ -196,7 +196,7 @@ int jffs2_scan_medium(struct jffs2_sb_info *c)
196 if (c->nextblock) { 196 if (c->nextblock) {
197 ret = file_dirty(c, c->nextblock); 197 ret = file_dirty(c, c->nextblock);
198 if (ret) 198 if (ret)
199 return ret; 199 goto out;
200 /* deleting summary information of the old nextblock */ 200 /* deleting summary information of the old nextblock */
201 jffs2_sum_reset_collected(c->summary); 201 jffs2_sum_reset_collected(c->summary);
202 } 202 }
@@ -207,7 +207,7 @@ int jffs2_scan_medium(struct jffs2_sb_info *c)
207 } else { 207 } else {
208 ret = file_dirty(c, jeb); 208 ret = file_dirty(c, jeb);
209 if (ret) 209 if (ret)
210 return ret; 210 goto out;
211 } 211 }
212 break; 212 break;
213 213