fix: READ_CAPACITY command for 12 bytes CDB SCSI device.
[lunaix-os.git] / lunaix-os / kernel / fs / pcache.c
index 9d883f90485402f702617dbd8a721040315d925b..8ef8fc8aa4359a95a15d8653d0d361f6a8bc0ff3 100644 (file)
@@ -189,6 +189,10 @@ pcache_commit(struct v_inode* inode, struct pcache_pg* page)
 void
 pcache_commit_all(struct v_inode* inode)
 {
+    if (!inode->pg_cache) {
+        return;
+    }
+
     struct pcache* cache = inode->pg_cache;
     struct pcache_pg *pos, *n;