Skip to contentSkip to conversation

VFS: make file->f_pos access atomic on 32bit arch

PATCH Bodo Eggert 1 participant 1 message Sep 16, 2008 1 message not in the archive VFS

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Review

Quoted 9 lines · Hisashi Hifumi

Protecting file->f_pos with a lock adds some overhead but I think we should fix this.
I used seqlock to serialize the access to file->f_pos. This approach is similar to inode->i_size synchronization.

Comments?

(quoted diff) +2 -0
+             if (offset != file_pos_read(file))
+                     file_pos_write(file, offset);

Maybe file_pos_write should do this check?