On Thu, Apr 10, 2008 at 05:22:12PM +0200, Jan Kara wrote: > You can get your inspiration in the implementation of i_size_read() > and i_size_write() functions :). They deal with exactly the same problem. > But in the case of f_pos, the number of readers and writers is balanced so > maybe a spinlock would be fine as well... It's not quite balanced -- see sys_getdents() for a counterexample. i_size_read/write use a seqcount rather than a seqlock, but the principle is the same. -- Intel are signing my paycheques ... these opinions are still mine "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step." -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html