Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357770
b: refs/heads/master
c: b464255
h: refs/heads/master
v: v3
  • Loading branch information
Eric W. Biederman committed Feb 12, 2013
1 parent 20df15d commit 2ffd797
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 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: 447c50943fd008755122c7a62bac068e73c1cf2c
refs/heads/master: b464255699077c6b33ea58ee01db80f5729511ad
17 changes: 9 additions & 8 deletions trunk/fs/9p/fid.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,20 @@ int v9fs_fid_add(struct dentry *dentry, struct p9_fid *fid)
*
*/

static struct p9_fid *v9fs_fid_find(struct dentry *dentry, u32 uid, int any)
static struct p9_fid *v9fs_fid_find(struct dentry *dentry, kuid_t uid, int any)
{
struct v9fs_dentry *dent;
struct p9_fid *fid, *ret;

p9_debug(P9_DEBUG_VFS, " dentry: %s (%p) uid %d any %d\n",
dentry->d_name.name, dentry, uid, any);
dentry->d_name.name, dentry, from_kuid(&init_user_ns, uid),
any);
dent = (struct v9fs_dentry *) dentry->d_fsdata;
ret = NULL;
if (dent) {
spin_lock(&dent->lock);
list_for_each_entry(fid, &dent->fidlist, dlist) {
if (any || fid->uid == uid) {
if (any || uid_eq(fid->uid, uid)) {
ret = fid;
break;
}
Expand Down Expand Up @@ -126,7 +127,7 @@ static int build_path_from_dentry(struct v9fs_session_info *v9ses,
}

static struct p9_fid *v9fs_fid_lookup_with_uid(struct dentry *dentry,
uid_t uid, int any)
kuid_t uid, int any)
{
struct dentry *ds;
char **wnames, *uname;
Expand Down Expand Up @@ -233,7 +234,7 @@ static struct p9_fid *v9fs_fid_lookup_with_uid(struct dentry *dentry,

struct p9_fid *v9fs_fid_lookup(struct dentry *dentry)
{
uid_t uid;
kuid_t uid;
int any, access;
struct v9fs_session_info *v9ses;

Expand All @@ -253,7 +254,7 @@ struct p9_fid *v9fs_fid_lookup(struct dentry *dentry)
break;

default:
uid = ~0;
uid = INVALID_UID;
any = 0;
break;
}
Expand All @@ -272,7 +273,7 @@ struct p9_fid *v9fs_fid_clone(struct dentry *dentry)
return ret;
}

static struct p9_fid *v9fs_fid_clone_with_uid(struct dentry *dentry, uid_t uid)
static struct p9_fid *v9fs_fid_clone_with_uid(struct dentry *dentry, kuid_t uid)
{
struct p9_fid *fid, *ret;

Expand All @@ -289,7 +290,7 @@ struct p9_fid *v9fs_writeback_fid(struct dentry *dentry)
int err;
struct p9_fid *fid;

fid = v9fs_fid_clone_with_uid(dentry, 0);
fid = v9fs_fid_clone_with_uid(dentry, GLOBAL_ROOT_UID);
if (IS_ERR(fid))
goto error_out;
/*
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/9p/v9fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ struct p9_fid *v9fs_session_init(struct v9fs_session_info *v9ses,
if ((v9ses->flags & V9FS_ACCESS_MASK) == V9FS_ACCESS_SINGLE)
fid->uid = v9ses->uid;
else
fid->uid = ~0;
fid->uid = INVALID_UID;

#ifdef CONFIG_9P_FSCACHE
/* register the session for caching */
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/net/9p/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ struct p9_fid {
int mode;
struct p9_qid qid;
u32 iounit;
uid_t uid;
kuid_t uid;

void *rdir;

Expand Down

0 comments on commit 2ffd797

Please sign in to comment.