diff options
author | Steve French <sfrench@us.ibm.com> | 2010-04-27 00:38:15 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-04-27 00:38:15 -0400 |
commit | d54ff73259a852d4b3886dc586587fdef5e9c8de (patch) | |
tree | 417ed0f9b87e4187641b053892eeb8f32ec32746 /fs/cifs/file.c | |
parent | 9bf67e516f16d31f86aa6f063576a959bbf19990 (diff) |
[CIFS] Fix lease break for writes
On lease break we were breaking to readonly leases always
even if write requested. Also removed experimental
ifdef around setlease code
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r-- | fs/cifs/file.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 5f1f7682256b..d53d6308bf3a 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -2306,12 +2306,10 @@ cifs_oplock_break(struct slow_work *work) | |||
2306 | int rc, waitrc = 0; | 2306 | int rc, waitrc = 0; |
2307 | 2307 | ||
2308 | if (inode && S_ISREG(inode->i_mode)) { | 2308 | if (inode && S_ISREG(inode->i_mode)) { |
2309 | #ifdef CONFIG_CIFS_EXPERIMENTAL | 2309 | if (cinode->clientCanCacheRead) |
2310 | if (cinode->clientCanCacheAll == 0) | ||
2311 | break_lease(inode, O_RDONLY); | 2310 | break_lease(inode, O_RDONLY); |
2312 | else if (cinode->clientCanCacheRead == 0) | 2311 | else |
2313 | break_lease(inode, O_WRONLY); | 2312 | break_lease(inode, O_WRONLY); |
2314 | #endif | ||
2315 | rc = filemap_fdatawrite(inode->i_mapping); | 2313 | rc = filemap_fdatawrite(inode->i_mapping); |
2316 | if (cinode->clientCanCacheRead == 0) { | 2314 | if (cinode->clientCanCacheRead == 0) { |
2317 | waitrc = filemap_fdatawait(inode->i_mapping); | 2315 | waitrc = filemap_fdatawait(inode->i_mapping); |