diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2019-01-28 22:55:38 -0800 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-01-29 09:27:03 +0100 |
commit | 0c2431b5a15ca03e20ce3c698b8b708181db5fd9 (patch) | |
tree | 56bc9715b4aff02e2a8a775e0604965c014d236f /fs/ext4/ext_barebox.c | |
parent | c44997e621cfe190fe44523e6cbcb03fea21eb8c (diff) | |
download | barebox-0c2431b5a15ca03e20ce3c698b8b708181db5fd9.tar.gz barebox-0c2431b5a15ca03e20ce3c698b8b708181db5fd9.tar.xz |
fs: Drop trivial .lseek() implementaitons in FS drivers
There are no FS drivers that do not implement .lseek callback in the
codebase, so there doesn't seem to exist a use-case where lseek()
would return -ENOSYS due to fsdrv->lseek being NULL. At the same time
a large number of FS drivers implement only the most basic "always
succeeds" custom .lseek() hook.
Change the code of lseek() to treat absense of .lseek() to mean that
no special actions needs to be taken by FS driver and seek is always
successful and drop all of the trivial .lseek() implementations.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'fs/ext4/ext_barebox.c')
-rw-r--r-- | fs/ext4/ext_barebox.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/ext4/ext_barebox.c b/fs/ext4/ext_barebox.c index 6e41b8345e..82d4c581e0 100644 --- a/fs/ext4/ext_barebox.c +++ b/fs/ext4/ext_barebox.c @@ -59,11 +59,6 @@ static int ext_read(struct device_d *_dev, FILE *f, void *buf, size_t insize) return ext4fs_read_file(node, f->pos, insize, buf); } -static loff_t ext_lseek(struct device_d *dev, FILE *f, loff_t pos) -{ - return pos; -} - static struct inode *ext_alloc_inode(struct super_block *sb) { struct fs_device_d *fsdev = container_of(sb, struct fs_device_d, sb); @@ -302,7 +297,6 @@ static void ext_remove(struct device_d *dev) static struct fs_driver_d ext_driver = { .read = ext_read, - .lseek = ext_lseek, .type = filetype_ext, .flags = 0, .drv = { |