ext4: change ext4_read_inline_dir() to return 0 on success
authorBoxiLiu <lewis.liulei@huawei.com>
Wed, 30 Oct 2013 12:07:20 +0000 (08:07 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 30 Oct 2013 12:07:20 +0000 (08:07 -0400)
In ext4_read_inline_dir(), if there is inline data, the successful
return value is the return value of ext4_read_inline_data().  Howewer,
this is used by ext4_readdir(), and while it seems harmless to return
a positive value on success, it's inconsistent, since historically
we've always return 0 on success.

Signed-off-by: BoxiLiu <lewis.liulei@huawei.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Acked-by: Tao Ma <boyu.mt@taobao.com>
fs/ext4/inline.c

index d9ecbf1113a75798f4d2a5903fd2fc522ce00dba..c3efb65d2ec68628a3c2f478f77dff903e56d19b 100644 (file)
@@ -1442,6 +1442,7 @@ int ext4_read_inline_dir(struct file *file,
        if (ret < 0)
                goto out;
 
+       ret = 0;
        sb = inode->i_sb;
        parent_ino = le32_to_cpu(((struct ext4_dir_entry_2 *)dir_buf)->inode);
        offset = ctx->pos;
This page took 0.028675 seconds and 5 git commands to generate.