Created attachment 10398 [details] patch for this issue Closing a directory handle file descriptor via close() is undefined, according to: http://pubs.opengroup.org/onlinepubs/9699919799/functions/dirfd.html
Created attachment 10429 [details] patch for 4-2-test, cherry-picked from master branch with extra bug tag
Comment on attachment 10429 [details] patch for 4-2-test, cherry-picked from master branch with extra bug tag LGTM.
Re-assigning to Karoloin for inclusion in 4.2.0.
(In reply to Jeremy Allison from comment #3) Pushed to autobuild-v4-2-test.
Pushed to v4-2-test. Closing out bug report. Thanks!