diff options
| author | Mister Oyster <oysterized@gmail.com> | 2017-05-27 15:18:41 +0200 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-05-27 19:39:50 +0200 |
| commit | 7d6942dac23aa52a8f213a788982c4e649ca016b (patch) | |
| tree | 0a833e93ea2de99d6314ee900fcd63b3c70d03fc | |
| parent | 91c9df9892c130fb9570b0a69ffbc7b3e2e28e9b (diff) | |
include/linux/fs.h: add dir_relax() for 3.18 backport
partial commit from ec991b05a282642359e81e65855f189f7881009c
include/linux/fs.h: add dir_emit() and dir_relax() for 3.18 backport
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| -rw-r--r-- | include/linux/fs.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index f61ad956a..4dc48e4af 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2756,4 +2756,11 @@ static inline void inode_has_no_xattr(struct inode *inode) inode->i_flags |= S_NOSEC; } +/* needed for 3.18 backport */ +static inline bool dir_relax(struct inode *inode) +{ + mutex_unlock(&inode->i_mutex); + mutex_lock(&inode->i_mutex); + return !IS_DEADDIR(inode); +} #endif /* _LINUX_FS_H */ |
