summaryrefslogtreecommitdiff
path: root/yaffs_vfs_multi.c
diff options
context:
space:
mode:
authorCharles Manning <cdhmanning@gmail.com>2010-11-30 16:01:28 +1300
committerCharles Manning <cdhmanning@gmail.com>2010-11-30 16:01:28 +1300
commited8188fb7659cfb65b5adbe154d143190ade0324 (patch)
tree957a1c70fb6dd13a35d57e706990d74fdce7363e /yaffs_vfs_multi.c
parentacf9438692c78de0ca030e5408790572dbe06500 (diff)
yaffs: Replace yaffs_dir_llseek with Linux generic llseek
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 <cdhmanning@gmail.com>
Diffstat (limited to 'yaffs_vfs_multi.c')
-rw-r--r--yaffs_vfs_multi.c29
1 files changed, 1 insertions, 28 deletions
diff --git a/yaffs_vfs_multi.c b/yaffs_vfs_multi.c
index 1d9ca00..2a3695a 100644
--- a/yaffs_vfs_multi.c
+++ b/yaffs_vfs_multi.c
@@ -341,8 +341,6 @@ static int yaffs_follow_link(struct dentry *dentry, struct nameidata *nd);
static void yaffs_touch_super(struct yaffs_dev *dev);
-static loff_t yaffs_dir_llseek(struct file *file, loff_t offset, int origin);
-
static int yaffs_vfs_setattr(struct inode *, struct iattr *);
static struct address_space_operations yaffs_file_address_operations = {
@@ -456,7 +454,7 @@ static const struct file_operations yaffs_dir_operations = {
.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 = {
@@ -1529,31 +1527,6 @@ static void yaffs_release_space(struct file *f)
yaffs_gross_unlock(dev);
}
-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)
{
struct yaffs_obj *obj;