On Wed, 13 Aug 2008, OGAWA Hirofumi wrote:I think it just makes things more confused. If we actually want to change the readdir() thing, then we should just make the rule be: - if the callback returns a non-zero value, the filesystem "readdir()" function should return that value (right now they are taught to return zero, and return errors on internal fatal things). And get rid of "buf.error" entirely. The reason for the whole "buf.error" etc stuff is simply because that avoided having the low-level filesystem even care about things. But if you really want to clean this up, we should *NOT* continue the current - the callers should then do error = vfs_readdir(file, filldir, &buf); lastdirent = buf.previous; if (lastdirent) { error = count - buf.count; if (put_user(file->f_pos, &lastdirent->d_off)) error = -EFAULT; } fput(file); return error; and we wouldn't need any other logic at all. As to -EOVERFLOW, I suspect we are better off just dropping that whole logic. Returning -EOVERFLOW and truncating the readdir listing is likely much worse than the alternative. It made sense back when we needed to get people to upgrade the system interfaces, now it just means that old binaries won't work at all. Linus --
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| James Bottomley | Re: Integration of SCST in the mainstream Linux kernel |
| Stephen Rothwell | Re: Announce: Linux-next (Or Andrew's dream :-)) |
| Arjan van de Ven | Re: [malware-list] [RFC 0/5] [TALPA] Intro to a linux interfaceforon access scanning |
| Patrick McHardy | Re: [GIT]: Networking |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Eric W. Biederman | Re: namespace support requires network modules to say "GPL" |
git: | |
