aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/filecheck.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/filecheck.c')
-rw-r--r--fs/ocfs2/filecheck.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/ocfs2/filecheck.c b/fs/ocfs2/filecheck.c
index 2cabbcf2f28e..5571268b681c 100644
--- a/fs/ocfs2/filecheck.c
+++ b/fs/ocfs2/filecheck.c
@@ -431,11 +431,7 @@ static ssize_t ocfs2_filecheck_show(struct kobject *kobj,
ret = snprintf(buf + total, remain, "%lu\t\t%u\t%s\n",
p->fe_ino, p->fe_done,
ocfs2_filecheck_error(p->fe_status));
- if (ret < 0) {
- total = ret;
- break;
- }
- if (ret == remain) {
+ if (ret >= remain) {
/* snprintf() didn't fit */
total = -E2BIG;
break;