WORKSPACE: bump Linux to 5.15.2
This involves ripping out fsinfo because there now is quotactl_fd which
handles what we originally used fsinfo for. I also enabled a few new
interesting kernel features in the config like the Landlock LSM and
KFENCE.
Change-Id: Ic0a113893a437b2c8068d06984fdc386f34e6adb
Reviewed-on: https://review.monogon.dev/c/monogon/+/444
Reviewed-by: Sergiusz Bazanski <serge@monogon.tech>
diff --git a/metropolis/pkg/fsquota/fsquota.go b/metropolis/pkg/fsquota/fsquota.go
index 263dd48..0d49592 100644
--- a/metropolis/pkg/fsquota/fsquota.go
+++ b/metropolis/pkg/fsquota/fsquota.go
@@ -43,10 +43,6 @@
return err
}
defer dir.Close()
- source, err := fsinfoGetSource(dir)
- if err != nil {
- return err
- }
var valid uint32
if maxBytes > 0 {
valid |= quotactl.FlagBLimitsValid
@@ -69,7 +65,7 @@
// kernels setquota interface. Due to the short time window and
// infrequent calls this should not be an immediate issue.
for {
- quota, err := quotactl.GetNextQuota(source, quotactl.QuotaTypeProject, lastID)
+ quota, err := quotactl.GetNextQuota(dir, quotactl.QuotaTypeProject, lastID)
if err == unix.ENOENT || err == unix.ESRCH {
// We have enumerated all quotas, nothing exists here
break
@@ -102,7 +98,7 @@
// Always round up to the nearest block size
bytesLimitBlocks := uint64(math.Ceil(float64(maxBytes) / float64(1024)))
- return quotactl.SetQuota(source, quotactl.QuotaTypeProject, lastID, "actl.Quota{
+ return quotactl.SetQuota(dir, quotactl.QuotaTypeProject, lastID, "actl.Quota{
BHardLimit: bytesLimitBlocks,
BSoftLimit: bytesLimitBlocks,
IHardLimit: maxInodes,
@@ -126,10 +122,6 @@
return nil, err
}
defer dir.Close()
- source, err := fsinfoGetSource(dir)
- if err != nil {
- return nil, err
- }
attrs, err := fsxattrs.Get(dir)
if err != nil {
return nil, err
@@ -137,7 +129,7 @@
if attrs.ProjectID == 0 {
return nil, os.ErrNotExist
}
- quota, err := quotactl.GetQuota(source, quotactl.QuotaTypeProject, attrs.ProjectID)
+ quota, err := quotactl.GetQuota(dir, quotactl.QuotaTypeProject, attrs.ProjectID)
if err != nil {
return nil, err
}