You can do it for write() in the case where no data have yet been written,
i.e. in prepare_write() first time round the loop. In fact, you can even
return -ERESTARTNOINTR in that case, just as you can for read() where no
data have yet been copied into userspace. Whether we want to special-case
the first time round the loop just to give better responsiveness in the
common case is debatable though.
You can also do it for open() in 2.5. (in 2.4 the read_inode API gave the
file system no choice but to return a full real inode or a bad one which
remained and prevented subsequent lookups of the same inode.)
-- dwmw2
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/