X-Git-Url: https://yaffs.net/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yaffs_vfs_single.c;h=0e2095fb23b7975f5674d71c1074051169cdb5e9;hp=c5376e947785231003ed2e397d48c09f40155d87;hb=ed8188fb7659cfb65b5adbe154d143190ade0324;hpb=acf9438692c78de0ca030e5408790572dbe06500 diff --git a/yaffs_vfs_single.c b/yaffs_vfs_single.c index c5376e9..0e2095f 100644 --- a/yaffs_vfs_single.c +++ b/yaffs_vfs_single.c @@ -185,8 +185,6 @@ static void *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 = { @@ -255,7 +253,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 = { @@ -1126,31 +1124,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;