commit | 24751743d7daa0da7ff60c43afe2f5e8ea4fc8eb | [log] [tgz] |
---|---|---|
author | Nick Kralevich <nnk@google.com> | Thu Mar 05 12:50:23 2015 -0800 |
committer | Nick Kralevich <nnk@google.com> | Thu Mar 05 12:50:23 2015 -0800 |
tree | 1adc755fc23c78b14e896d049dd7fb4c8fd543f2 | |
parent | 5054f7ee4fa6e747eb8d08f60ec91ba6a9363878 [diff] |
fstrim.c: use open(O_DIRECTORY) instead of stat open(O_DIRECTORY) returns an error if the open attempt is against anything other than a directory. This basically duplicates the check that the stat() call was trying to do. Eliminate the unnecessary stat() call and use O_DIRECTORY instead. Change-Id: I1821abbed325f29a7214fdc41ed27cd9e26817d0