Skip to content

Commit a1fde8e

Browse files
committed
cifs: use locks_inode_context helper
cifs currently doesn't access i_flctx safely. This requires a smp_load_acquire, as the pointer is set via cmpxchg (a release operation). Cc: Steve French <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Jeff Layton <[email protected]>
1 parent d4e7866 commit a1fde8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/cifs/file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1413,7 +1413,7 @@ cifs_push_posix_locks(struct cifsFileInfo *cfile)
14131413
struct inode *inode = d_inode(cfile->dentry);
14141414
struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
14151415
struct file_lock *flock;
1416-
struct file_lock_context *flctx = inode->i_flctx;
1416+
struct file_lock_context *flctx = locks_inode_context(inode);
14171417
unsigned int count = 0, i;
14181418
int rc = 0, xid, type;
14191419
struct list_head locks_to_send, *el;

0 commit comments

Comments
 (0)