mount: invalidate xattr

This commit is contained in:
Chris Lu 2019-12-17 20:38:56 -08:00
parent 54369eccea
commit c42b023960
2 changed files with 10 additions and 2 deletions

View File

@ -343,6 +343,8 @@ func (dir *Dir) Setxattr(ctx context.Context, req *fuse.SetxattrRequest) error {
return err
}
dir.wfs.listDirectoryEntriesCache.Delete(dir.Path)
return dir.saveEntry(ctx)
}
@ -359,6 +361,8 @@ func (dir *Dir) Removexattr(ctx context.Context, req *fuse.RemovexattrRequest) e
return err
}
dir.wfs.listDirectoryEntriesCache.Delete(dir.Path)
return dir.saveEntry(ctx)
}
@ -375,7 +379,7 @@ func (dir *Dir) Listxattr(ctx context.Context, req *fuse.ListxattrRequest, resp
return err
}
return dir.saveEntry(ctx)
return nil
}

View File

@ -144,6 +144,8 @@ func (file *File) Setxattr(ctx context.Context, req *fuse.SetxattrRequest) error
return err
}
file.wfs.listDirectoryEntriesCache.Delete(file.fullpath())
return file.saveEntry(ctx)
}
@ -160,6 +162,8 @@ func (file *File) Removexattr(ctx context.Context, req *fuse.RemovexattrRequest)
return err
}
file.wfs.listDirectoryEntriesCache.Delete(file.fullpath())
return file.saveEntry(ctx)
}
@ -176,7 +180,7 @@ func (file *File) Listxattr(ctx context.Context, req *fuse.ListxattrRequest, res
return err
}
return file.saveEntry(ctx)
return nil
}