[1/3] fs/libfs: use SEEK_CUR/SET
diff mbox

Message ID 20170228194523.2054-1-tkusumi@tuxera.com
State New
Headers show

Commit Message

Tomohiro Kusumi Feb. 28, 2017, 7:45 p.m. UTC
Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
---
 fs/libfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch
diff mbox

diff --git a/fs/libfs.c b/fs/libfs.c
index 28d6f35..cb03444 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -143,9 +143,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: