* [PATCH] fs/libfs.c: let lseek use SEEK_SET and SEEK_CUR
@ 2019-02-26 9:36 Yufen Yu
2019-03-12 5:57 ` yuyufen
0 siblings, 1 reply; 2+ messages in thread
From: Yufen Yu @ 2019-02-26 9:36 UTC (permalink / raw)
To: viro; +Cc: linux-fsdevel
Let dcache_dir_lseek() use SEEK_SET and SEEK_CUR to make
code more unify.
Signed-off-by: Yufen Yu <yuyufen@huawei.com>
---
fs/libfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/libfs.c b/fs/libfs.c
index 0fb590d79f30..37654d33bd29 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -144,9 +144,9 @@ loff_t dcache_dir_lseek(struct file *file, loff_t offset, int whence)
{
struct dentry *dentry = file->f_path.dentry;
switch (whence) {
- case 1:
+ case SEEK_CUR:
offset += file->f_pos;
- case 0:
+ case SEEK_SET:
if (offset >= 0)
break;
default:
--
2.16.2.dirty
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fs/libfs.c: let lseek use SEEK_SET and SEEK_CUR
2019-02-26 9:36 [PATCH] fs/libfs.c: let lseek use SEEK_SET and SEEK_CUR Yufen Yu
@ 2019-03-12 5:57 ` yuyufen
0 siblings, 0 replies; 2+ messages in thread
From: yuyufen @ 2019-03-12 5:57 UTC (permalink / raw)
To: viro; +Cc: linux-fsdevel
ping ?
On 2019/2/26 17:36, Yufen Yu wrote:
> Let dcache_dir_lseek() use SEEK_SET and SEEK_CUR to make
> code more unify.
>
> Signed-off-by: Yufen Yu <yuyufen@huawei.com>
> ---
> fs/libfs.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/libfs.c b/fs/libfs.c
> index 0fb590d79f30..37654d33bd29 100644
> --- a/fs/libfs.c
> +++ b/fs/libfs.c
> @@ -144,9 +144,9 @@ loff_t dcache_dir_lseek(struct file *file, loff_t offset, int whence)
> {
> struct dentry *dentry = file->f_path.dentry;
> switch (whence) {
> - case 1:
> + case SEEK_CUR:
> offset += file->f_pos;
> - case 0:
> + case SEEK_SET:
> if (offset >= 0)
> break;
> default:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-12 5:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-26 9:36 [PATCH] fs/libfs.c: let lseek use SEEK_SET and SEEK_CUR Yufen Yu
2019-03-12 5:57 ` yuyufen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).