]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
proc-show-locks-in-proc-pid-fdinfo-x-v2
authorAndrey Vagin <avagin@openvz.org>
Tue, 7 Apr 2015 23:44:51 +0000 (09:44 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 7 Apr 2015 23:44:51 +0000 (09:44 +1000)
use seq_has_overflowed() properly

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Jeff Layton <jlayton@poochiereds.net>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/proc/fd.c

index f04e13d3c845c19c8f3c79efa0df31f778d74c68..af84ad04df7713a9c590c2de94537b385803059e 100644 (file)
@@ -57,17 +57,15 @@ static int seq_show(struct seq_file *m, void *v)
                   real_mount(file->f_path.mnt)->mnt_id);
 
        show_fd_locks(m, file, files);
-       ret = seq_has_overflowed(m);
-       if (ret)
+       if (seq_has_overflowed(m))
                goto out;
 
        if (file->f_op->show_fdinfo)
                file->f_op->show_fdinfo(m, file);
-       ret = seq_has_overflowed(m);
 
 out:
        fput(file);
-       return ret;
+       return 0;
 }
 
 static int seq_fdinfo_open(struct inode *inode, struct file *file)