* ext4_readdir ignores filldir error code
@ 2012-09-24 12:47 Kasatkin, Dmitry
2012-09-24 15:07 ` Jan Kara
0 siblings, 1 reply; 2+ messages in thread
From: Kasatkin, Dmitry @ 2012-09-24 12:47 UTC (permalink / raw)
To: linux-fsdevel@vger.kernel.org, linux-ext4, Theodore Ts'o
Hello,
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?
- Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: ext4_readdir ignores filldir error code
2012-09-24 12:47 ext4_readdir ignores filldir error code Kasatkin, Dmitry
@ 2012-09-24 15:07 ` Jan Kara
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2012-09-24 15:07 UTC (permalink / raw)
To: Kasatkin, Dmitry
Cc: linux-fsdevel@vger.kernel.org, linux-ext4, Theodore Ts'o
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@suse.cz>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-24 15:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-24 12:47 ext4_readdir ignores filldir error code Kasatkin, Dmitry
2012-09-24 15:07 ` Jan Kara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).