提交 d44a9fe2 编写于 作者: J Jeff Layton 提交者: Steve French

cifs: switch cifs_open and cifs_create to use CIFSSMBUnixSetFileInfo

We call CIFSSMBUnixSetPathInfo in these functions, but we have a
filehandle since an open was just done. Switch these functions to
use CIFSSMBUnixSetFileInfo instead.

In practice, these codepaths are only used if posix opens are broken.
Signed-off-by: NJeff Layton <jlayton@redhat.com>
Signed-off-by: NSteve French <sfrench@us.ibm.com>
上级 ca40b714
...@@ -293,10 +293,8 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, ...@@ -293,10 +293,8 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
args.uid = NO_CHANGE_64; args.uid = NO_CHANGE_64;
args.gid = NO_CHANGE_64; args.gid = NO_CHANGE_64;
} }
CIFSSMBUnixSetPathInfo(xid, tcon, full_path, &args, CIFSSMBUnixSetFileInfo(xid, tcon, &args, fileHandle,
cifs_sb->local_nls, current->tgid);
cifs_sb->mnt_cifs_flags &
CIFS_MOUNT_MAP_SPECIAL_CHR);
} else { } else {
/* BB implement mode setting via Windows security /* BB implement mode setting via Windows security
descriptors e.g. */ descriptors e.g. */
......
...@@ -424,10 +424,8 @@ int cifs_open(struct inode *inode, struct file *file) ...@@ -424,10 +424,8 @@ int cifs_open(struct inode *inode, struct file *file)
.mtime = NO_CHANGE_64, .mtime = NO_CHANGE_64,
.device = 0, .device = 0,
}; };
CIFSSMBUnixSetPathInfo(xid, tcon, full_path, &args, CIFSSMBUnixSetFileInfo(xid, tcon, &args, netfid,
cifs_sb->local_nls, pCifsFile->pid);
cifs_sb->mnt_cifs_flags &
CIFS_MOUNT_MAP_SPECIAL_CHR);
} }
out: out:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册