mount: check possible nil entry case
This commit is contained in:
@@ -106,6 +106,9 @@ func (wfs *WFS) SetXAttr(cancel <-chan struct{}, input *fuse.SetXAttrIn, attr st
|
||||
if status != fuse.OK {
|
||||
return status
|
||||
}
|
||||
if entry == nil {
|
||||
return fuse.ENOENT
|
||||
}
|
||||
if fh != nil {
|
||||
fh.entryLock.Lock()
|
||||
defer fh.entryLock.Unlock()
|
||||
@@ -181,6 +184,9 @@ func (wfs *WFS) RemoveXAttr(cancel <-chan struct{}, header *fuse.InHeader, attr
|
||||
if status != fuse.OK {
|
||||
return status
|
||||
}
|
||||
if entry == nil {
|
||||
return fuse.OK
|
||||
}
|
||||
if fh != nil {
|
||||
fh.entryLock.Lock()
|
||||
defer fh.entryLock.Unlock()
|
||||
|
||||
Reference in New Issue
Block a user