@@ -271,7 +271,7 @@ static int cx25821_get_audio_data(struct cx25821_dev *dev,
if (dev->_audiofile_status == END_OF_FILE)
return 0;
- file = filp_open(dev->_audiofilename, O_RDONLY | O_LARGEFILE, 0);
+ file = filp_open(dev->_audiofilename, O_RDONLY, 0);
if (IS_ERR(file)) {
pr_err("%s(): ERROR opening file(%s) with errno = %ld!\n",
__func__, dev->_audiofilename, -PTR_ERR(file));
@@ -326,7 +326,7 @@ static int cx25821_openfile_audio(struct cx25821_dev *dev,
loff_t offset;
int i, j;
- file = filp_open(dev->_audiofilename, O_RDONLY | O_LARGEFILE, 0);
+ file = filp_open(dev->_audiofilename, O_RDONLY, 0);
if (IS_ERR(file)) {
pr_err("%s(): ERROR opening file(%s) with errno = %ld!\n",
__func__, dev->_audiofilename, PTR_ERR(file));
@@ -575,7 +575,7 @@ static int alloc_device(struct nandsim *ns)
int i, err;
if (cache_file) {
- cfile = filp_open(cache_file, O_CREAT | O_RDWR | O_LARGEFILE, 0600);
+ cfile = filp_open(cache_file, O_CREAT | O_RDWR, 0600);
if (IS_ERR(cfile))
return PTR_ERR(cfile);
if (!(cfile->f_mode & FMODE_CAN_READ)) {
@@ -683,7 +683,7 @@ int cfs_tracefile_dump_all_pages(char *filename)
cfs_tracefile_write_lock();
- filp = filp_open(filename, O_CREAT|O_EXCL|O_WRONLY|O_LARGEFILE, 0600);
+ filp = filp_open(filename, O_CREAT|O_EXCL|O_WRONLY, 0600);
if (IS_ERR(filp)) {
rc = PTR_ERR(filp);
filp = NULL;
@@ -985,7 +985,7 @@ static int tracefiled(void *arg)
cfs_tracefile_read_lock();
if (cfs_tracefile[0] != 0) {
filp = filp_open(cfs_tracefile,
- O_CREAT | O_RDWR | O_LARGEFILE,
+ O_CREAT | O_RDWR,
0600);
if (IS_ERR(filp)) {
rc = PTR_ERR(filp);
@@ -114,7 +114,7 @@ static int fd_configure_device(struct se_device *dev)
* Use O_DSYNC by default instead of O_SYNC to forgo syncing
* of pure timestamp updates.
*/
- flags = O_RDWR | O_CREAT | O_LARGEFILE | O_DSYNC;
+ flags = O_RDWR | O_CREAT | O_DSYNC;
/*
* Optionally allow fd_buffered_io=1 to be enabled for people
@@ -732,7 +732,7 @@ static int fd_init_prot(struct se_device *dev)
struct fd_dev *fd_dev = FD_DEV(dev);
struct file *prot_file, *file = fd_dev->fd_file;
struct inode *inode;
- int ret, flags = O_RDWR | O_CREAT | O_LARGEFILE | O_DSYNC;
+ int ret, flags = O_RDWR | O_CREAT | O_DSYNC;
char buf[FD_MAX_DEV_PROT_NAME];
if (!file) {
@@ -196,12 +196,12 @@ int fsg_lun_open(struct fsg_lun *curlun, const char *filename)
/* R/W if we can, R/O if we must */
ro = curlun->initially_ro;
if (!ro) {
- filp = filp_open(filename, O_RDWR | O_LARGEFILE, 0);
+ filp = filp_open(filename, O_RDWR, 0);
if (PTR_ERR(filp) == -EROFS || PTR_ERR(filp) == -EACCES)
ro = 1;
}
if (ro)
- filp = filp_open(filename, O_RDONLY | O_LARGEFILE, 0);
+ filp = filp_open(filename, O_RDONLY, 0);
if (IS_ERR(filp)) {
LINFO(curlun, "unable to open backing file: %s\n", filename);
return PTR_ERR(filp);
@@ -1462,8 +1462,6 @@ static int blkdev_open(struct inode * inode, struct file * filp)
* binary needs it. We might want to drop this workaround
* during an unstable branch.
*/
- filp->f_flags |= O_LARGEFILE;
-
if (filp->f_flags & O_NDELAY)
filp->f_mode |= FMODE_NDELAY;
if (filp->f_flags & O_EXCL)
@@ -909,7 +909,7 @@ int cachefiles_write_page(struct fscache_storage *op, struct page *page)
* own time */
path.mnt = cache->mnt;
path.dentry = object->backer;
- file = dentry_open(&path, O_RDWR | O_LARGEFILE, cache->cache_cred);
+ file = dentry_open(&path, O_RDWR, cache->cache_cred);
if (IS_ERR(file)) {
ret = PTR_ERR(file);
} else {
@@ -667,8 +667,7 @@ void do_coredump(const siginfo_t *siginfo)
* writes its coredump successfully, not which one.
*/
cprm.file = filp_open(cn.corename,
- O_CREAT | 2 | O_NOFOLLOW |
- O_LARGEFILE | O_EXCL,
+ O_CREAT | 2 | O_NOFOLLOW | O_EXCL,
0600);
if (IS_ERR(cprm.file))
goto fail_unlock;
@@ -74,7 +74,7 @@ static int ecryptfs_threadfn(void *ignored)
kthread_ctl_list);
list_del(&req->kthread_ctl_list);
*req->lower_file = dentry_open(&req->path,
- (O_RDWR | O_LARGEFILE), current_cred());
+ O_RDWR, current_cred());
complete(&req->done);
}
mutex_unlock(&ecryptfs_kthread_ctl.mux);
@@ -133,7 +133,7 @@ int ecryptfs_privileged_open(struct file **lower_file,
const struct cred *cred)
{
struct ecryptfs_open_req req;
- int flags = O_LARGEFILE;
+ int flags = 0;
int rc = 0;
init_completion(&req.done);
@@ -118,7 +118,7 @@ SYSCALL_DEFINE1(uselib, const char __user *, library)
struct filename *tmp = getname(library);
int error = PTR_ERR(tmp);
static const struct open_flags uselib_flags = {
- .open_flag = O_LARGEFILE | O_RDONLY | __FMODE_EXEC,
+ .open_flag = O_RDONLY | __FMODE_EXEC,
.acc_mode = MAY_READ | MAY_EXEC | MAY_OPEN,
.intent = LOOKUP_OPEN,
.lookup_flags = LOOKUP_FOLLOW,
@@ -762,7 +762,7 @@ static struct file *do_open_execat(int fd, struct filename *name, int flags)
struct file *file;
int err;
struct open_flags open_exec_flags = {
- .open_flag = O_LARGEFILE | O_RDONLY | __FMODE_EXEC,
+ .open_flag = O_RDONLY | __FMODE_EXEC,
.acc_mode = MAY_EXEC | MAY_OPEN,
.intent = LOOKUP_OPEN,
.lookup_flags = LOOKUP_FOLLOW,
@@ -640,7 +640,7 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type,
struct path path;
struct inode *inode;
struct file *file;
- int flags = O_RDONLY|O_LARGEFILE;
+ int flags = O_RDONLY;
__be32 err;
int host_err = 0;
@@ -690,9 +690,9 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type,
if (may_flags & NFSD_MAY_WRITE) {
if (may_flags & NFSD_MAY_READ)
- flags = O_RDWR|O_LARGEFILE;
+ flags = O_RDWR;
else
- flags = O_WRONLY|O_LARGEFILE;
+ flags = O_WRONLY;
}
file = dentry_open(&path, flags, current_cred());
@@ -201,7 +201,7 @@ static int acct_on(struct filename *pathname)
return -ENOMEM;
/* Difference from BSD - they don't do O_APPEND */
- file = file_open_name(pathname, O_WRONLY|O_APPEND|O_LARGEFILE, 0);
+ file = file_open_name(pathname, O_WRONLY|O_APPEND, 0);
if (IS_ERR(file)) {
kfree(acct);
return PTR_ERR(file);
@@ -2968,7 +2968,7 @@ SYSCALL_DEFINE2(memfd_create,
}
info = SHMEM_I(file_inode(file));
file->f_mode |= FMODE_LSEEK | FMODE_PREAD | FMODE_PWRITE;
- file->f_flags |= O_RDWR | O_LARGEFILE;
+ file->f_flags |= O_RDWR;
if (flags & MFD_ALLOW_SEALING)
info->seals &= ~F_SEAL_SEAL;
@@ -1863,7 +1863,7 @@ SYSCALL_DEFINE1(swapoff, const char __user *, specialfile)
if (IS_ERR(pathname))
return PTR_ERR(pathname);
- victim = file_open_name(pathname, O_RDWR|O_LARGEFILE, 0);
+ victim = file_open_name(pathname, O_RDWR, 0);
err = PTR_ERR(victim);
if (IS_ERR(victim))
goto out;
@@ -2419,7 +2419,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
name = NULL;
goto bad_swap;
}
- swap_file = file_open_name(name, O_RDWR|O_LARGEFILE, 0);
+ swap_file = file_open_name(name, O_RDWR, 0);
if (IS_ERR(swap_file)) {
error = PTR_ERR(swap_file);
swap_file = NULL;
@@ -3046,7 +3046,7 @@ static void setup_block_file(const char *filename)
vblk = dev->priv = malloc(sizeof(*vblk));
/* First we open the file and store the length. */
- vblk->fd = open_or_die(filename, O_RDWR|O_LARGEFILE);
+ vblk->fd = open_or_die(filename, O_RDWR);
vblk->len = lseek64(vblk->fd, 0, SEEK_END);
/* Tell Guest how many sectors this device has. */
Don't pass O_LARGEFILE when opening a file internally within the kernel because due to the preceeding commit, the flag is now assumed fixed on for all arches, not just 64-bit ones. Signed-off-by: David Howells <dhowells@redhat.com> --- drivers/media/pci/cx25821/cx25821-audio-upstream.c | 4 ++-- drivers/mtd/nand/nandsim.c | 2 +- drivers/staging/lustre/lustre/libcfs/tracefile.c | 4 ++-- drivers/target/target_core_file.c | 4 ++-- drivers/usb/gadget/function/storage_common.c | 4 ++-- fs/block_dev.c | 2 -- fs/cachefiles/rdwr.c | 2 +- fs/coredump.c | 3 +-- fs/ecryptfs/kthread.c | 4 ++-- fs/exec.c | 4 ++-- fs/nfsd/vfs.c | 6 +++--- kernel/acct.c | 2 +- mm/shmem.c | 2 +- mm/swapfile.c | 4 ++-- tools/lguest/lguest.c | 2 +- 15 files changed, 23 insertions(+), 26 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html