]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/pstore/inode.c
pstore: Fail to unlink if a driver has not defined pstore_erase
[karo-tx-linux.git] / fs / pstore / inode.c
index e4bcb2cf055a1dc8f81df7cbb38e8cdab4add0b0..bfd95bf38005cba25bc5cece73555701b25c76f2 100644 (file)
@@ -178,6 +178,8 @@ static int pstore_unlink(struct inode *dir, struct dentry *dentry)
        if (p->psi->erase)
                p->psi->erase(p->type, p->id, p->count,
                              dentry->d_inode->i_ctime, p->psi);
+       else
+               return -EPERM;
 
        return simple_unlink(dir, dentry);
 }