summaryrefslogtreecommitdiffstats
path: root/fs/cifs/file.c
diff options
context:
space:
mode:
authorJeff Layton2014-04-30 15:31:45 +0200
committerSteve French2014-05-21 19:18:05 +0200
commitaff8d5ca7a3dca0bd6f6e86c9a85bf04941262ce (patch)
tree3bb10e19fa53334df6b7731a14e4cfb4bec82f35 /fs/cifs/file.c
parentcifs: fix cifs_uniqueid_to_ino_t not to ever return 0 (diff)
downloadkernel-qcow2-linux-aff8d5ca7a3dca0bd6f6e86c9a85bf04941262ce.tar.gz
kernel-qcow2-linux-aff8d5ca7a3dca0bd6f6e86c9a85bf04941262ce.tar.xz
kernel-qcow2-linux-aff8d5ca7a3dca0bd6f6e86c9a85bf04941262ce.zip
cifs: convert booleans in cifsInodeInfo to a flags field
In later patches, we'll need to have a bitlock, so go ahead and convert these bools to use atomic bitops instead. Also, clean up the initialization of the flags field. There's no need to unset each bit individually just after it was zeroed on allocation. Signed-off-by: Jeff Layton <jlayton@poochiereds.net> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r--fs/cifs/file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 5ed03e0b8b40..c8a570e87900 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -392,7 +392,7 @@ void cifsFileInfo_put(struct cifsFileInfo *cifs_file)
* again and get at least level II oplock.
*/
if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_STRICT_IO)
- CIFS_I(inode)->invalid_mapping = true;
+ set_bit(CIFS_INO_INVALID_MAPPING, &cifsi->flags);
cifs_set_oplock_level(cifsi, 0);
}
spin_unlock(&cifs_file_list_lock);
@@ -2562,7 +2562,7 @@ ssize_t cifs_user_writev(struct kiocb *iocb, const struct iovec *iov,
written = cifs_iovec_write(iocb->ki_filp, iov, nr_segs, &pos);
if (written > 0) {
- CIFS_I(inode)->invalid_mapping = true;
+ set_bit(CIFS_INO_INVALID_MAPPING, &CIFS_I(inode)->flags);
iocb->ki_pos = pos;
}