summaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2019-01-28 22:55:37 -0800
committerSascha Hauer <s.hauer@pengutronix.de>2019-01-29 09:27:03 +0100
commitc44997e621cfe190fe44523e6cbcb03fea21eb8c (patch)
treebfd907f6c2fcd6ee6073f1d48864df6644aa559a /fs/ext4
parent6811cc0dbc04c71cdc1ff12efe0edc8660200563 (diff)
downloadbarebox-c44997e621cfe190fe44523e6cbcb03fea21eb8c.tar.gz
barebox-c44997e621cfe190fe44523e6cbcb03fea21eb8c.tar.xz
fs: Update FILE position in lseek()
Instead on relying on driver callbacks to update 'pos' in FILE, do it as a part of lseek() code. This allows us to drop a bit of repeating code as well as making lseek() implementation consistent with write() and read(). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/ext_barebox.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/ext4/ext_barebox.c b/fs/ext4/ext_barebox.c
index 1e7da2a4b4..6e41b8345e 100644
--- a/fs/ext4/ext_barebox.c
+++ b/fs/ext4/ext_barebox.c
@@ -61,9 +61,7 @@ static int ext_read(struct device_d *_dev, FILE *f, void *buf, size_t insize)
static loff_t ext_lseek(struct device_d *dev, FILE *f, loff_t pos)
{
- f->pos = pos;
-
- return f->pos;
+ return pos;
}
static struct inode *ext_alloc_inode(struct super_block *sb)