]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - block/t10-pi.c
netfilter: expect: fix crash when putting uninited expectation
[mirror_ubuntu-artful-kernel.git] / block / t10-pi.c
index 3416dadf7b15b3c66cd71d04d9a954d7d0238657..a98db384048fa0f1e497fc740faebaabce79c955 100644 (file)
@@ -28,9 +28,6 @@
 
 typedef __be16 (csum_fn) (void *, unsigned int);
 
-static const __be16 APP_ESCAPE = (__force __be16) 0xffff;
-static const __be32 REF_ESCAPE = (__force __be32) 0xffffffff;
-
 static __be16 t10_pi_crc_fn(void *data, unsigned int len)
 {
        return cpu_to_be16(crc_t10dif(data, len));
@@ -82,7 +79,7 @@ static blk_status_t t10_pi_verify(struct blk_integrity_iter *iter,
                switch (type) {
                case 1:
                case 2:
-                       if (pi->app_tag == APP_ESCAPE)
+                       if (pi->app_tag == T10_PI_APP_ESCAPE)
                                goto next;
 
                        if (be32_to_cpu(pi->ref_tag) !=
@@ -95,8 +92,8 @@ static blk_status_t t10_pi_verify(struct blk_integrity_iter *iter,
                        }
                        break;
                case 3:
-                       if (pi->app_tag == APP_ESCAPE &&
-                           pi->ref_tag == REF_ESCAPE)
+                       if (pi->app_tag == T10_PI_APP_ESCAPE &&
+                           pi->ref_tag == T10_PI_REF_ESCAPE)
                                goto next;
                        break;
                }