Commit 4ee7e4a6 authored by Christoph Fritz's avatar Christoph Fritz Committed by Miklos Szeredi

ovl: fix NULL pointer dereference in copy up warning

This patch is fixing a NULL pointer dereference to get a recently
introduced warning message working.

Fixes: 5b0a414d ("ovl: fix filattr copy-up failure")
Signed-off-by: default avatarChristoph Fritz <chf.fritz@googlemail.com>
Cc: <stable@vger.kernel.org> # v5.15
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent df0cc57e
...@@ -145,7 +145,7 @@ static int ovl_copy_fileattr(struct inode *inode, struct path *old, ...@@ -145,7 +145,7 @@ static int ovl_copy_fileattr(struct inode *inode, struct path *old,
if (err == -ENOTTY || err == -EINVAL) if (err == -ENOTTY || err == -EINVAL)
return 0; return 0;
pr_warn("failed to retrieve lower fileattr (%pd2, err=%i)\n", pr_warn("failed to retrieve lower fileattr (%pd2, err=%i)\n",
old, err); old->dentry, err);
return err; return err;
} }
...@@ -168,7 +168,7 @@ static int ovl_copy_fileattr(struct inode *inode, struct path *old, ...@@ -168,7 +168,7 @@ static int ovl_copy_fileattr(struct inode *inode, struct path *old,
err = ovl_real_fileattr_get(new, &newfa); err = ovl_real_fileattr_get(new, &newfa);
if (err) { if (err) {
pr_warn("failed to retrieve upper fileattr (%pd2, err=%i)\n", pr_warn("failed to retrieve upper fileattr (%pd2, err=%i)\n",
new, err); new->dentry, err);
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment