summaryrefslogtreecommitdiff
path: root/fs/aufs/sysfs.c
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-12-15 14:52:16 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-12-15 14:52:16 -0300
commit8d91c1e411f55d7ea91b1183a2e9f8088fb4d5be (patch)
treee9891aa6c295060d065adffd610c4f49ecf884f3 /fs/aufs/sysfs.c
parenta71852147516bc1cb5b0b3cbd13639bfd4022dc8 (diff)
Linux-libre 4.3.2-gnu
Diffstat (limited to 'fs/aufs/sysfs.c')
-rw-r--r--fs/aufs/sysfs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/aufs/sysfs.c b/fs/aufs/sysfs.c
index cc74d02b1..ec8df8f6c 100644
--- a/fs/aufs/sysfs.c
+++ b/fs/aufs/sysfs.c
@@ -64,15 +64,15 @@ static int sysaufs_si_br(struct seq_file *seq, struct super_block *sb,
err = au_seq_path(seq, &path);
if (!err) {
au_optstr_br_perm(&perm, br->br_perm);
- err = seq_printf(seq, "=%s\n", perm.a);
+ seq_printf(seq, "=%s\n", perm.a);
}
break;
case AuBrSysfs_BRID:
- err = seq_printf(seq, "%d\n", br->br_id);
+ seq_printf(seq, "%d\n", br->br_id);
break;
}
di_read_unlock(root, !AuLock_IR);
- if (err == -1)
+ if (unlikely(err || seq_has_overflowed(seq)))
err = -E2BIG;
return err;
@@ -229,8 +229,8 @@ static int au_brinfo(struct super_block *sb, union aufs_brinfo __user *arg)
err = au_seq_path(seq, &br->br_path);
if (unlikely(err))
break;
- err = seq_putc(seq, '\0');
- if (!err && seq->count <= sz) {
+ seq_putc(seq, '\0');
+ if (!seq_has_overflowed(seq)) {
err = copy_to_user(arg->path, seq->buf, seq->count);
seq->count = 0;
if (unlikely(err))