Re: [PATCH] fs/libfs.c: let lseek use SEEK_SET and SEEK_CUR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@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:





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux