X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yaffs_vfs_multi.c;h=2a3695a9cb24cad232c71104fdba649bd04b3f04;hp=1d9ca00717a5ae7ecd0b69afcab24ce041c48d48;hb=fcc9631a249a467718a7ae67c58ae1ab29e5d034;hpb=8b7bb68127f6074218a368f8059e844ab51536c1 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;