Let dcache_dir_lseek() use SEEK_SET and SEEK_CUR to make code more unify. Signed-off-by: Yufen Yu <yuyufen@xxxxxxxxxx> --- 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