diff options
author | Jeff Layton <jlayton@redhat.com> | 2012-03-23 18:40:56 (GMT) |
---|---|---|
committer | Jeff Layton <jlayton@redhat.com> | 2012-03-23 18:40:56 (GMT) |
commit | 597b027f694481ffeebcffe634c24b807198d46c (patch) | |
tree | 2dce2da017aa89c9e7465014ffa7aced11393b28 /fs/cifs/cifsglob.h | |
parent | e9492871fb0546f1b73f309d9e8c0f030bfdfdca (diff) | |
download | linux-fsl-qoriq-597b027f694481ffeebcffe634c24b807198d46c.tar.xz |
cifs: call cifs_update_eof with i_lock held
cifs_update_eof has the potential to be racy if multiple threads are
trying to modify it at the same time. Protect modifications of the
server_eof value with the inode->i_lock.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r-- | fs/cifs/cifsglob.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index d7e39b0..4ff6313 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h @@ -626,7 +626,7 @@ struct cifsInodeInfo { bool delete_pending; /* DELETE_ON_CLOSE is set */ bool invalid_mapping; /* pagecache is invalid */ unsigned long time; /* jiffies of last update of inode */ - u64 server_eof; /* current file size on server */ + u64 server_eof; /* current file size on server -- protected by i_lock */ u64 uniqueid; /* server inode number */ u64 createtime; /* creation time on server */ #ifdef CONFIG_CIFS_FSCACHE |