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>
static void yaffs_touch_super(struct yaffs_dev *dev);
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 = {
static int yaffs_vfs_setattr(struct inode *, struct iattr *);
static struct address_space_operations yaffs_file_address_operations = {
.read = generic_read_dir,
.readdir = yaffs_readdir,
.fsync = yaffs_sync_object,
.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 = {
};
static const struct super_operations yaffs_super_ops = {
yaffs_gross_unlock(dev);
}
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;
static int yaffs_readdir(struct file *f, void *dirent, filldir_t filldir)
{
struct yaffs_obj *obj;
static void yaffs_touch_super(struct yaffs_dev *dev);
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 = {
static int yaffs_vfs_setattr(struct inode *, struct iattr *);
static struct address_space_operations yaffs_file_address_operations = {
.read = generic_read_dir,
.readdir = yaffs_readdir,
.fsync = yaffs_sync_object,
.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 = {
};
static const struct super_operations yaffs_super_ops = {
yaffs_gross_unlock(dev);
}
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;
static int yaffs_readdir(struct file *f, void *dirent, filldir_t filldir)
{
struct yaffs_obj *obj;