[PATCH, RFC 1/3] ext4: Convert calls of ext4_error() to EXT4_ERROR_INODE()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



EXT4_ERROR_INODE() tends to provide better error information and in a
more consistent format.

Addresses-Google-Bug: #2507977

Signed-off-by: "Theodore Ts'o" <tytso@xxxxxxx>
---

Yes, there are more calls to ext4_error that we probably want to convert
to use ext4_error_inode; this is just for illustrative purposes, and
because it's the one which is most obnoxious if there is a bad entry in
a particular inode which is referenced over and over again (see patch 3
in this series).

 fs/ext4/namei.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 0c070fa..0c0cba4 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -1072,9 +1072,9 @@ static struct dentry *ext4_lookup(struct inode *dir, struct dentry *dentry, stru
 		inode = ext4_iget(dir->i_sb, ino);
 		if (unlikely(IS_ERR(inode))) {
 			if (PTR_ERR(inode) == -ESTALE) {
-				ext4_error(dir->i_sb,
-						"deleted inode referenced: %u",
-						ino);
+				EXT4_ERROR_INODE(dir,
+						 "deleted inode referenced: %u",
+						 ino);
 				return ERR_PTR(-EIO);
 			} else {
 				return ERR_CAST(inode);
-- 
1.6.6.1.1.g974db.dirty

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux