diff options
| author | Mister Oyster <oysterized@gmail.com> | 2017-03-30 17:15:30 +0200 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-13 12:32:20 +0200 |
| commit | 2ceb1bd829e41aad234b847a15ccc741287c5b2a (patch) | |
| tree | b7ae847fc8f99a75842a7b8b854cf4744901616d | |
| parent | 033b9530c4ac015e7a4ca23527410d2c00c6bd94 (diff) | |
Revert "sdcardfs: Flag files as non-mappable"
This reverts commit b6a5e4ec2f6e2cabf5630fefcfc942992e3a028f.
| -rwxr-xr-x | fs/sdcardfs/file.c | 8 | ||||
| -rw-r--r-- | include/linux/fs.h | 4 | ||||
| -rw-r--r-- | mm/mmap.c | 3 |
3 files changed, 0 insertions, 15 deletions
diff --git a/fs/sdcardfs/file.c b/fs/sdcardfs/file.c index 2b3aa03ab..369051e6d 100755 --- a/fs/sdcardfs/file.c +++ b/fs/sdcardfs/file.c @@ -227,7 +227,6 @@ static int sdcardfs_open(struct inode *inode, struct file *file) /* save current_cred and override it */ OVERRIDE_CRED(sbi, saved_cred); - file->f_mode |= FMODE_NONMAPPABLE; file->private_data = kzalloc(sizeof(struct sdcardfs_file_info), GFP_KERNEL); if (!SDCARDFS_F(file)) { @@ -322,11 +321,6 @@ static int sdcardfs_fasync(int fd, struct file *file, int flag) return err; } -static struct file *sdcardfs_get_lower_file(struct file *f) -{ - return sdcardfs_lower_file(f); -} - const struct file_operations sdcardfs_main_fops = { .llseek = generic_file_llseek, .read = sdcardfs_read, @@ -341,7 +335,6 @@ const struct file_operations sdcardfs_main_fops = { .release = sdcardfs_file_release, .fsync = sdcardfs_fsync, .fasync = sdcardfs_fasync, - .get_lower_file = sdcardfs_get_lower_file, }; /* trimmed directory options */ @@ -358,5 +351,4 @@ const struct file_operations sdcardfs_dir_fops = { .flush = sdcardfs_flush, .fsync = sdcardfs_fsync, .fasync = sdcardfs_fasync, - .get_lower_file = sdcardfs_get_lower_file, }; diff --git a/include/linux/fs.h b/include/linux/fs.h index 3b0a8ab85..fe4570d62 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -122,9 +122,6 @@ typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset, /* File is opened with O_PATH; almost nothing can be done with it */ #define FMODE_PATH ((__force fmode_t)0x4000) -/* File hasn't page cache and can't be mmaped, for stackable filesystem */ -#define FMODE_NONMAPPABLE ((__force fmode_t)0x400000) - /* File was opened by fanotify and shouldn't generate fanotify events */ #define FMODE_NONOTIFY ((__force fmode_t)0x1000000) @@ -1560,7 +1557,6 @@ struct file_operations { long (*fallocate)(struct file *file, int mode, loff_t offset, loff_t len); int (*show_fdinfo)(struct seq_file *m, struct file *f); - struct file* (*get_lower_file)(struct file *f); }; struct inode_operations { @@ -1241,9 +1241,6 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, *populate = 0; - while (file && (file->f_mode & FMODE_NONMAPPABLE)) - file = file->f_op->get_lower_file(file); - /* * Does the application expect PROT_READ to imply PROT_EXEC? * |
