diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2014-05-16 11:07:19 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2014-05-16 11:07:19 +1000 |
commit | e52bc4327285e60b4d3048e433e22b21d1b04c20 (patch) | |
tree | 35ff66ff7525916d1629571979b9603386ecce32 /drivers/mtd | |
parent | af53f8daa77c63685c64f365a5e858ec1c3a474a (diff) | |
parent | 9bd0bc947d9549d13ecfc03454638f7c5c66154a (diff) |
Merge remote-tracking branch 'vfs/for-next'
Conflicts:
fs/cifs/cifsfs.c
fs/f2fs/file.c
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/nandsim.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c index 42e8a770e631..4f0d83648e5a 100644 --- a/drivers/mtd/nand/nandsim.c +++ b/drivers/mtd/nand/nandsim.c @@ -575,12 +575,12 @@ static int alloc_device(struct nandsim *ns) cfile = filp_open(cache_file, O_CREAT | O_RDWR | O_LARGEFILE, 0600); if (IS_ERR(cfile)) return PTR_ERR(cfile); - if (!cfile->f_op->read && !cfile->f_op->aio_read) { + if (!(cfile->f_mode & FMODE_CAN_READ)) { NS_ERR("alloc_device: cache file not readable\n"); err = -EINVAL; goto err_close; } - if (!cfile->f_op->write && !cfile->f_op->aio_write) { + if (!(cfile->f_mode & FMODE_CAN_WRITE)) { NS_ERR("alloc_device: cache file not writeable\n"); err = -EINVAL; goto err_close; |