From 05ea13b746e715f03c70e29068b650a62e5e5d79 Mon Sep 17 00:00:00 2001 From: florian Date: Thu, 14 Mar 2013 14:45:56 +0000 Subject: kernel: add support for 3.9-rc2 Signed-off-by: Florian Fainelli git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36008 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- ...ce-yaffs_dir_llseek-with-Linux-generic-ll.patch | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 target/linux/generic/patches-3.9/503-yaffs-Replace-yaffs_dir_llseek-with-Linux-generic-ll.patch (limited to 'target/linux/generic/patches-3.9/503-yaffs-Replace-yaffs_dir_llseek-with-Linux-generic-ll.patch') diff --git a/target/linux/generic/patches-3.9/503-yaffs-Replace-yaffs_dir_llseek-with-Linux-generic-ll.patch b/target/linux/generic/patches-3.9/503-yaffs-Replace-yaffs_dir_llseek-with-Linux-generic-ll.patch new file mode 100644 index 000000000..d283e8559 --- /dev/null +++ b/target/linux/generic/patches-3.9/503-yaffs-Replace-yaffs_dir_llseek-with-Linux-generic-ll.patch @@ -0,0 +1,72 @@ +From cd6657c4bde20886b0805ea9f2cbac7ec25ac2e5 Mon Sep 17 00:00:00 2001 +From: Charles Manning +Date: Tue, 30 Nov 2010 16:01:28 +1300 +Subject: [PATCH 1/2] yaffs: Replace yaffs_dir_llseek with Linux generic + llseek + +commit ed8188fb7659cfb65b5adbe154d143190ade0324 upstream. + +There was not much point in having the yaffs version as it is +functionally equivalent to the kernel one. + +This also gets rid of using BKL in yaffs2. + +Signed-off-by: Charles Manning +--- + yaffs_vfs.c | 30 +----------------------------- + yaffs_vfs_multi.c | 30 +----------------------------- + 2 files changed, 2 insertions(+), 58 deletions(-) + +--- a/fs/yaffs2/yaffs_vfs_glue.c ++++ b/fs/yaffs2/yaffs_vfs_glue.c +@@ -342,8 +342,6 @@ static int yaffs_follow_link(struct dent + + static void yaffs_touch_super(yaffs_dev_t *dev); + +-static loff_t yaffs_dir_llseek(struct file *file, loff_t offset, int origin); +- + static int yaffs_vfs_setattr(struct inode *, struct iattr *); + + +@@ -460,7 +458,7 @@ static const struct file_operations yaff + .read = generic_read_dir, + .readdir = yaffs_readdir, + .fsync = yaffs_sync_object, +- .llseek = yaffs_dir_llseek, ++ .llseek = generic_file_llseek, + }; + + static const struct super_operations yaffs_super_ops = { +@@ -1534,32 +1532,6 @@ static void yaffs_release_space(struct f + } + + +-static loff_t yaffs_dir_llseek(struct file *file, loff_t offset, int origin) +-{ +- long long retval; +- +- lock_kernel(); +- +- switch (origin){ +- case 2: +- offset += i_size_read(file->f_path.dentry->d_inode); +- break; +- case 1: +- offset += file->f_pos; +- } +- retval = -EINVAL; +- +- if (offset >= 0){ +- if (offset != file->f_pos) +- file->f_pos = offset; +- +- retval = offset; +- } +- unlock_kernel(); +- return retval; +-} +- +- + static int yaffs_readdir(struct file *f, void *dirent, filldir_t filldir) + { + yaffs_obj_t *obj; -- cgit v1.2.3