Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116234
b: refs/heads/master
c: 504e518
h: refs/heads/master
v: v3
  • Loading branch information
Neil Brown authored and Trond Myklebust committed Oct 17, 2008
1 parent b83d0d1 commit cb82849
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 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: 18de9735300756e3ca9c361ef58409d8561dfe0d
refs/heads/master: 504e518953a330c8d44a95bdd65a5c9f50f1012e
6 changes: 4 additions & 2 deletions trunk/fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1659,8 +1659,10 @@ nfs4_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr,
struct nfs_open_context *ctx;

ctx = nfs_file_open_context(sattr->ia_file);
cred = ctx->cred;
state = ctx->state;
if (ctx) {
cred = ctx->cred;
state = ctx->state;
}
}

status = nfs4_do_setattr(inode, cred, fattr, sattr, state);
Expand Down
8 changes: 6 additions & 2 deletions trunk/include/linux/nfs_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,12 @@ static inline struct nfs_open_context *nfs_file_open_context(struct file *filp)

static inline struct rpc_cred *nfs_file_cred(struct file *file)
{
if (file != NULL)
return nfs_file_open_context(file)->cred;
if (file != NULL) {
struct nfs_open_context *ctx =
nfs_file_open_context(file);
if (ctx)
return ctx->cred;
}
return NULL;
}

Expand Down

0 comments on commit cb82849

Please sign in to comment.