summaryrefslogtreecommitdiffstats
path: root/fs/overlayfs
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2021-04-10 12:17:50 +0300
committerMiklos Szeredi <mszeredi@redhat.com>2021-04-12 12:00:37 +0200
commit5e717c6fa41ff9b9b0c1e5959ccf5d8ef42f804b (patch)
tree29dcf746586fb790057e2b4d7bdb8159158932a0 /fs/overlayfs
parent65cd913ec9d9d71529665924c81015b7ab7d9381 (diff)
downloadlinux-5e717c6fa41ff9b9b0c1e5959ccf5d8ef42f804b.tar.gz
linux-5e717c6fa41ff9b9b0c1e5959ccf5d8ef42f804b.tar.bz2
linux-5e717c6fa41ff9b9b0c1e5959ccf5d8ef42f804b.zip
ovl: add debug print to ovl_do_getxattr()
It was the only ovl_do helper missing it. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs')
-rw-r--r--fs/overlayfs/overlayfs.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h
index 2322f854533c..d1e08d804207 100644
--- a/fs/overlayfs/overlayfs.h
+++ b/fs/overlayfs/overlayfs.h
@@ -186,7 +186,12 @@ static inline ssize_t ovl_do_getxattr(struct ovl_fs *ofs, struct dentry *dentry,
size_t size)
{
const char *name = ovl_xattr(ofs, ox);
- return vfs_getxattr(&init_user_ns, dentry, name, value, size);
+ int err = vfs_getxattr(&init_user_ns, dentry, name, value, size);
+ int len = (value && err > 0) ? err : 0;
+
+ pr_debug("getxattr(%pd2, \"%s\", \"%*pE\", %zu, 0) = %i\n",
+ dentry, name, min(len, 48), value, size, err);
+ return err;
}
static inline int ovl_do_setxattr(struct ovl_fs *ofs, struct dentry *dentry,