Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 221592
b: refs/heads/master
c: d389229
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Layton authored and Steve French committed Nov 4, 2010
1 parent b0c2da9 commit 199c6bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6ef933a38ade555a175ecab9d803e6bb73399763
refs/heads/master: d38922949d377da7d47473c7868334408ae3b373
10 changes: 3 additions & 7 deletions trunk/fs/cifs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,12 +754,6 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)

cifs_sb = CIFS_SB(file->f_path.dentry->d_sb);
tcon = tlink_tcon(((struct cifsFileInfo *)file->private_data)->tlink);

if (file->private_data == NULL) {
rc = -EBADF;
FreeXid(xid);
return rc;
}
netfid = ((struct cifsFileInfo *)file->private_data)->netfid;

if ((tcon->ses->capabilities & CAP_UNIX) &&
Expand Down Expand Up @@ -1154,7 +1148,7 @@ struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *cifs_inode,
bool fsuid_only)
{
struct cifsFileInfo *open_file;
struct cifs_sb_info *cifs_sb = CIFS_SB(cifs_inode->vfs_inode.i_sb);
struct cifs_sb_info *cifs_sb;
bool any_available = false;
int rc;

Expand All @@ -1168,6 +1162,8 @@ struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *cifs_inode,
return NULL;
}

cifs_sb = CIFS_SB(cifs_inode->vfs_inode.i_sb);

/* only filter by fsuid on multiuser mounts */
if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MULTIUSER))
fsuid_only = false;
Expand Down

0 comments on commit 199c6bb

Please sign in to comment.