diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-07-14 12:13:41 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-07-14 12:13:41 -0400 |
commit | 03fe805a098422d27cbbbad29a54ff1349da3622 (patch) | |
tree | 0db9cc9a701203ddcee58e5b907d4fb8ad31b421 /include/linux/fs.h | |
parent | 50dd9050e45ce11c575eabcaee8a914caf78fb74 (diff) | |
parent | 5646eda5851e6cfdfa22d41895e3f5daffa643d3 (diff) |
Merge branch 'topic/monotonic' into for-next
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 338e6f758c6d..e11d60cc867b 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1921,6 +1921,12 @@ static inline int break_lease(struct inode *inode, unsigned int mode) | |||
1921 | 1921 | ||
1922 | static inline int break_deleg(struct inode *inode, unsigned int mode) | 1922 | static inline int break_deleg(struct inode *inode, unsigned int mode) |
1923 | { | 1923 | { |
1924 | /* | ||
1925 | * Since this check is lockless, we must ensure that any refcounts | ||
1926 | * taken are done before checking inode->i_flock. Otherwise, we could | ||
1927 | * end up racing with tasks trying to set a new lease on this file. | ||
1928 | */ | ||
1929 | smp_mb(); | ||
1924 | if (inode->i_flock) | 1930 | if (inode->i_flock) |
1925 | return __break_lease(inode, mode, FL_DELEG); | 1931 | return __break_lease(inode, mode, FL_DELEG); |
1926 | return 0; | 1932 | return 0; |