mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
fs/tmpfs: use atomic operations to access inode.mode
PiperOrigin-RevId: 342214859
This commit is contained in:
@@ -631,7 +631,8 @@ func (i *inode) direntType() uint8 {
|
||||
}
|
||||
|
||||
func (i *inode) isDir() bool {
|
||||
return linux.FileMode(i.mode).FileType() == linux.S_IFDIR
|
||||
mode := linux.FileMode(atomic.LoadUint32(&i.mode))
|
||||
return mode.FileType() == linux.S_IFDIR
|
||||
}
|
||||
|
||||
func (i *inode) touchAtime(mnt *vfs.Mount) {
|
||||
|
||||
Reference in New Issue
Block a user