From e4c9a491c8ea74facf590a406744f38ae907ddc4 Mon Sep 17 00:00:00 2001 From: Jiuzhu Dong Date: Fri, 1 Apr 2022 12:12:34 +0800 Subject: [PATCH] fs/unionfs: check return value to avoid unused value Signed-off-by: Jiuzhu Dong --- fs/unionfs/fs_unionfs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/unionfs/fs_unionfs.c b/fs/unionfs/fs_unionfs.c index 13979a40bb0..704d916822b 100644 --- a/fs/unionfs/fs_unionfs.c +++ b/fs/unionfs/fs_unionfs.c @@ -1856,6 +1856,10 @@ static int unionfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir) if (ops->rewinddir != NULL) { ret = ops->rewinddir(um->um_node, fu->fu_lower[1]); + if (ret < 0) + { + return ret; + } } /* Then try the read operation again */