diff options
author | Mark Brown <broonie@linaro.org> | 2013-07-22 11:16:51 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-07-22 11:16:51 +0100 |
commit | 9f6772da061814c2962aeb7d79231f7510dba313 (patch) | |
tree | e0c4a856204af6adff125ee61fe1f3059cada71b /fs/cifs/file.c | |
parent | d998ec4860d366424a55059093bb022beb38a61d (diff) | |
parent | 0f4a56e16d5fc9028b62ba529177a3109513e111 (diff) |
Merge tag 'v3.10.2' into linux-linaro-lsk-androidlsk-android
This is the 3.10.2 stable release
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r-- | fs/cifs/file.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 48b29d24c9f..c2934f8701d 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -553,11 +553,10 @@ cifs_relock_file(struct cifsFileInfo *cfile) struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); int rc = 0; - /* we are going to update can_cache_brlcks here - need a write access */ - down_write(&cinode->lock_sem); + down_read(&cinode->lock_sem); if (cinode->can_cache_brlcks) { - /* can cache locks - no need to push them */ - up_write(&cinode->lock_sem); + /* can cache locks - no need to relock */ + up_read(&cinode->lock_sem); return rc; } @@ -568,7 +567,7 @@ cifs_relock_file(struct cifsFileInfo *cfile) else rc = tcon->ses->server->ops->push_mand_locks(cfile); - up_write(&cinode->lock_sem); + up_read(&cinode->lock_sem); return rc; } |