From: Zygo Blaxell Date: Sat, 15 Aug 2015 15:44:11 +0000 (-0400) Subject: zygo: fs/btrfs: make noise for EIO: the inline function X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83201967ced2b3849ea81102e06dba672cf5fbdb;p=linux zygo: fs/btrfs: make noise for EIO: the inline function (cherry picked from commit 7fcb906872148dc2b293d328e8afb902d1843d47) zygo: fs/btrfs: make noise for EIO: the inline function in both necessary header files (cherry picked from commit df25a98ca7c6659e55498721e3d7104687008c5b) zygo: fs/btrfs: make noise for EIO: the one exception to the GSR rule (cherry picked from commit 4b5daa5700309ceed3c27d071de962b1394a7208) zygo: fs/btrfs: make noise for EIO: generalized exception markup --- diff --git a/fs/btrfs/compression.h b/fs/btrfs/compression.h index d181f70caae01..a49d902fa427c 100644 --- a/fs/btrfs/compression.h +++ b/fs/btrfs/compression.h @@ -19,6 +19,8 @@ #ifndef __BTRFS_COMPRESSION_ #define __BTRFS_COMPRESSION_ +#include "eieio.h" + void btrfs_init_compress(void); void btrfs_exit_compress(void); diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index f9c89cae39ee4..fd535cf0bfb15 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -4204,4 +4204,6 @@ static inline int btrfs_test_is_dummy_root(struct btrfs_root *root) return 0; } +#include "eieio.h" + #endif diff --git a/fs/btrfs/eieio.h b/fs/btrfs/eieio.h new file mode 100644 index 0000000000000..9163753918c17 --- /dev/null +++ b/fs/btrfs/eieio.h @@ -0,0 +1,9 @@ +#ifndef EIEIO +static inline int eieio(const char *func, const char *file, int line) +{ + printk(KERN_INFO "EIO at %s %s:%d\n", func, file, line); + return EIO; /* not EIEIO */ +} + +#define EIEIO (eieio(__FUNCTION__, __FILE__, __LINE__)) +#endif diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index e477ed67a49ad..c161caed31d36 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -74,7 +74,7 @@ static const char *btrfs_decode_error(int errno) char *errstr = "unknown"; switch (errno) { - case -EIO: + case -EIO: /* can't use EIEIO here */ errstr = "IO failure"; break; case -ENOMEM: diff --git a/fs/btrfs/zlib.c b/fs/btrfs/zlib.c index fb22fd8d8fb8f..a18ff0597319f 100644 --- a/fs/btrfs/zlib.c +++ b/fs/btrfs/zlib.c @@ -186,7 +186,7 @@ static int zlib_compress_pages(struct list_head *ws, zlib_deflateEnd(&workspace->strm); if (ret != Z_STREAM_END) { - ret = -EIO; + ret = -EIO; /* Too much noise for EIEIO here */ goto out; }