On Tue, Feb 12, 2013 at 02:18:30PM +0100, Karel Zak wrote: > On Tue, Feb 12, 2013 at 12:56:10PM +0100, Bernhard Voelker wrote: > > On 02/12/2013 12:23 PM, Sami Kerola wrote: > > > Almost off topic. > > > > while we're at it - ;-) > > is it necessary to open/read/close "/proc/self/mountinfo" so often? > > > > $ strace -e open ./lslocks 2>&1 | grep mountinfo | wc -l > > 67 > > especially when we have libmount in the same source tree :-) Just use > mnt_new_table_from_file(_PATH_PROC_MOUNTINFO) and keep the pointer... Fixed. $ strace -e open ./lslocks 2>&1 | grep mountinfo | wc -l 1 Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html