Created
September 1, 2023 18:55
-
-
Save ruiwen-zhao/93ebe0b4ad20fab005d0300e9f0194c2 to your computer and use it in GitHub Desktop.
ignore ENXIO in ovl_copy_fileattr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c | |
index ef0bf98b6..77a94db11 100644 | |
--- a/fs/overlayfs/copy_up.c | |
+++ b/fs/overlayfs/copy_up.c | |
@@ -142,7 +142,7 @@ static int ovl_copy_fileattr(struct inode *inode, struct path *old, | |
err = ovl_real_fileattr_get(old, &oldfa); | |
if (err) { | |
/* Ntfs-3g returns -EINVAL for "no fileattr support" */ | |
- if (err == -ENOTTY || err == -EINVAL) | |
+ if (err == -ENOTTY || err == -EINVAL || err == -ENXIO) | |
return 0; | |
pr_warn("failed to retrieve lower fileattr (%pd2, err=%i)\n", | |
old->dentry, err); | |
@@ -173,7 +173,7 @@ static int ovl_copy_fileattr(struct inode *inode, struct path *old, | |
* Returning an error if upper doesn't support fileattr will | |
* result in a regression, so revert to the old behavior. | |
*/ | |
- if (err == -ENOTTY || err == -EINVAL) { | |
+ if (err == -ENOTTY || err == -EINVAL || err == -ENXIO) { | |
pr_warn_once("copying fileattr: no support on upper\n"); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment