On 9 November 2015 at 08:51, Karel Zak <kzak@xxxxxxxxxx> wrote: > Hmmm... this abstraction introduces extra stat() calls. Would be > enough to use is_same_inode() directly in the code to reuse struct > stat? I agree, previous version of open_blkdev_or_file() did too many stat() calls. Reconsidered version takes stat structure as pointer. I found all occurrences where this function was needed having to do stat() any away, so this seems like the best way. https://github.com/kerolasa/lelux-utiliteetit/commit/8fe1e638fa81d88e1e405f6221c7a592284c9b23 -- Sami Kerola http://www.iki.fi/kerolasa/ -- 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