diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-28 13:43:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-28 13:43:32 -0400 |
commit | dabcbb1bae0f55378060b285062b20f6ec648c6a (patch) | |
tree | 027cdd35ce43cce95a78afab22e1e809b436b636 /include/linux/freezer.h | |
parent | 5619a693965b291315685bdfe01a0246ebd7e41e (diff) | |
parent | e0c8ea1a69410ef44043646938a6a4175f5307e4 (diff) |
Merge branch '3.2-without-smb2' of git://git.samba.org/sfrench/cifs-2.6
* '3.2-without-smb2' of git://git.samba.org/sfrench/cifs-2.6: (52 commits)
Fix build break when freezer not configured
Add definition for share encryption
CIFS: Make cifs_push_locks send as many locks at once as possible
CIFS: Send as many mandatory unlock ranges at once as possible
CIFS: Implement caching mechanism for posix brlocks
CIFS: Implement caching mechanism for mandatory brlocks
CIFS: Fix DFS handling in cifs_get_file_info
CIFS: Fix error handling in cifs_readv_complete
[CIFS] Fixup trivial checkpatch warning
[CIFS] Show nostrictsync and noperm mount options in /proc/mounts
cifs, freezer: add wait_event_freezekillable and have cifs use it
cifs: allow cifs_max_pending to be readable under /sys/module/cifs/parameters
cifs: tune bdi.ra_pages in accordance with the rsize
cifs: allow for larger rsize= options and change defaults
cifs: convert cifs_readpages to use async reads
cifs: add cifs_async_readv
cifs: fix protocol definition for READ_RSP
cifs: add a callback function to receive the rest of the frame
cifs: break out 3rd receive phase into separate function
cifs: find mid earlier in receive codepath
...
Diffstat (limited to 'include/linux/freezer.h')
-rw-r--r-- | include/linux/freezer.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/include/linux/freezer.h b/include/linux/freezer.h index aa56cf31f7ff..a49b52934c55 100644 --- a/include/linux/freezer.h +++ b/include/linux/freezer.h | |||
@@ -135,10 +135,25 @@ static inline void set_freezable_with_signal(void) | |||
135 | } | 135 | } |
136 | 136 | ||
137 | /* | 137 | /* |
138 | * Freezer-friendly wrappers around wait_event_interruptible() and | 138 | * Freezer-friendly wrappers around wait_event_interruptible(), |
139 | * wait_event_interruptible_timeout(), originally defined in <linux/wait.h> | 139 | * wait_event_killable() and wait_event_interruptible_timeout(), originally |
140 | * defined in <linux/wait.h> | ||
140 | */ | 141 | */ |
141 | 142 | ||
143 | #define wait_event_freezekillable(wq, condition) \ | ||
144 | ({ \ | ||
145 | int __retval; \ | ||
146 | do { \ | ||
147 | __retval = wait_event_killable(wq, \ | ||
148 | (condition) || freezing(current)); \ | ||
149 | if (__retval && !freezing(current)) \ | ||
150 | break; \ | ||
151 | else if (!(condition)) \ | ||
152 | __retval = -ERESTARTSYS; \ | ||
153 | } while (try_to_freeze()); \ | ||
154 | __retval; \ | ||
155 | }) | ||
156 | |||
142 | #define wait_event_freezable(wq, condition) \ | 157 | #define wait_event_freezable(wq, condition) \ |
143 | ({ \ | 158 | ({ \ |
144 | int __retval; \ | 159 | int __retval; \ |
@@ -190,6 +205,9 @@ static inline void set_freezable_with_signal(void) {} | |||
190 | #define wait_event_freezable_timeout(wq, condition, timeout) \ | 205 | #define wait_event_freezable_timeout(wq, condition, timeout) \ |
191 | wait_event_interruptible_timeout(wq, condition, timeout) | 206 | wait_event_interruptible_timeout(wq, condition, timeout) |
192 | 207 | ||
208 | #define wait_event_freezekillable(wq, condition) \ | ||
209 | wait_event_killable(wq, condition) | ||
210 | |||
193 | #endif /* !CONFIG_FREEZER */ | 211 | #endif /* !CONFIG_FREEZER */ |
194 | 212 | ||
195 | #endif /* FREEZER_H_INCLUDED */ | 213 | #endif /* FREEZER_H_INCLUDED */ |