HomeFreeBSD

Update inode under range lock

Description

Update inode under range lock

After a successful write the inode must be updated under the range
lock. If it is updated after dropping the lock there exists a race
where the znode and inode wile disagree about the file size. This
could result in narrow window of time where read(2) is able to access
data beyond what fstat(2) reports as the file size.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ned Bass <bass6@llnl.gov>
Closes #3601

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Jul 16 2015, 8:35 PM
Parents
rGbd29109f1ac5: Linux 4.2 compat: follow_link() / put_link()
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG2a53e2dacc7a: Update inode under range lock (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Jul 17 2015, 4:18 PM