diff options
-rw-r--r-- | fs/overlayfs/export.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/overlayfs/export.c b/fs/overlayfs/export.c index b65ea49..bb94ce9 100644 --- a/fs/overlayfs/export.c +++ b/fs/overlayfs/export.c @@ -108,6 +108,9 @@ static int ovl_d_to_fh(struct dentry *dentry, char *buf, int buflen) /* Encode an upper or origin file handle */ fh = ovl_encode_fh(origin ?: ovl_dentry_upper(dentry), !origin); + err = PTR_ERR(fh); + if (IS_ERR(fh)) + goto fail; err = -EOVERFLOW; if (fh->len > buflen) |