From: Yufen Yu <yuyufen@huawei.com>
To: <viro@zeniv.linux.org.uk>
Cc: <linux-fsdevel@vger.kernel.org>
Subject: [PATCH] fs/libfs.c: let lseek use SEEK_SET and SEEK_CUR
Date: Tue, 26 Feb 2019 17:36:59 +0800 [thread overview]
Message-ID: <20190226093659.111125-1-yuyufen@huawei.com> (raw)
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
next reply other threads:[~2019-02-26 9:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-26 9:36 Yufen Yu [this message]
2019-03-12 5:57 ` [PATCH] fs/libfs.c: let lseek use SEEK_SET and SEEK_CUR yuyufen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190226093659.111125-1-yuyufen@huawei.com \
--to=yuyufen@huawei.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).