Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262988
b: refs/heads/master
c: e22906c
h: refs/heads/master
v: v3
  • Loading branch information
Shirish Pargaonkar authored and Steve French committed Aug 11, 2011
1 parent 98e073b commit 02e1f55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 28 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: 789e66612367f9975d704c9e4990025cbbbb45ec
refs/heads/master: e22906c564c2f9c73ee4621ef3b93fe374539f00
28 changes: 1 addition & 27 deletions trunk/fs/cifs/cifsacl.c
Original file line number Diff line number Diff line change
Expand Up @@ -991,24 +991,6 @@ struct cifs_ntsd *get_cifs_acl(struct cifs_sb_info *cifs_sb,
return pntsd;
}

static int set_cifs_acl_by_fid(struct cifs_sb_info *cifs_sb, __u16 fid,
struct cifs_ntsd *pnntsd, u32 acllen)
{
int xid, rc;
struct tcon_link *tlink = cifs_sb_tlink(cifs_sb);

if (IS_ERR(tlink))
return PTR_ERR(tlink);

xid = GetXid();
rc = CIFSSMBSetCIFSACL(xid, tlink_tcon(tlink), fid, pnntsd, acllen);
FreeXid(xid);
cifs_put_tlink(tlink);

cFYI(DBG2, "SetCIFSACL rc = %d", rc);
return rc;
}

static int set_cifs_acl_by_path(struct cifs_sb_info *cifs_sb, const char *path,
struct cifs_ntsd *pnntsd, u32 acllen)
{
Expand Down Expand Up @@ -1047,18 +1029,10 @@ int set_cifs_acl(struct cifs_ntsd *pnntsd, __u32 acllen,
struct inode *inode, const char *path)
{
struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
struct cifsFileInfo *open_file;
int rc;

cFYI(DBG2, "set ACL for %s from mode 0x%x", path, inode->i_mode);

open_file = find_readable_file(CIFS_I(inode), true);
if (!open_file)
return set_cifs_acl_by_path(cifs_sb, path, pnntsd, acllen);

rc = set_cifs_acl_by_fid(cifs_sb, open_file->netfid, pnntsd, acllen);
cifsFileInfo_put(open_file);
return rc;
return set_cifs_acl_by_path(cifs_sb, path, pnntsd, acllen);
}

/* Translate the CIFS ACL (simlar to NTFS ACL) for a file into mode bits */
Expand Down

0 comments on commit 02e1f55

Please sign in to comment.