[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20120924150734.GE12264@quack.suse.cz>
Date: Mon, 24 Sep 2012 17:07:34 +0200
From: Jan Kara <jack@...e.cz>
To: "Kasatkin, Dmitry" <dmitry.kasatkin@...el.com>
Cc: "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
linux-ext4@...r.kernel.org, Theodore Ts'o <tytso@....edu>
Subject: Re: ext4_readdir ignores filldir error code
Hello,
On Mon 24-09-12 15:47:24, Kasatkin, Dmitry wrote:
> I noticed following in ext4_readdir() and in other file systems..
>
> filldir returns error in "error":
> error = filldir(dirent, de->name, ...)
>
> But function itself returns "ret"
>
> What I can see is that when filldir fails, ext4_readir quits, but with
> no error....
> while (!error && !stored && filp->f_pos < inode->i_size) {
>
>
> Is it by design or an error?
It works as designed (although I agree that the design is a bit odd).
Note that filler functions also set dirent->error which is then used by
e.g. getdents() syscall to set return value.
Honza
--
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists