Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158561
b: refs/heads/master
c: 7364af6
h: refs/heads/master
i:
  158559: d19f222
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Aug 9, 2009
1 parent 8c2d611 commit bcbf63c
Show file tree
Hide file tree
Showing 2 changed files with 12 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: b693ba4a338da15db1db4b5ebaa36e4ab9781c82
refs/heads/master: 7364af6a2d5e708b5c6fee3cce08d1bd7b27c9f1
15 changes: 11 additions & 4 deletions trunk/net/sunrpc/rpc_pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ enum {
struct rpc_filelist {
char *name;
const struct file_operations *i_fop;
int mode;
umode_t mode;
};

static struct rpc_filelist files[] = {
Expand Down Expand Up @@ -516,7 +516,7 @@ rpc_release_path(struct nameidata *nd)
}

static struct inode *
rpc_get_inode(struct super_block *sb, int mode)
rpc_get_inode(struct super_block *sb, umode_t mode)
{
struct inode *inode = new_inode(sb);
if (!inode)
Expand Down Expand Up @@ -589,7 +589,8 @@ rpc_populate(struct dentry *parent,
struct inode *inode, *dir = parent->d_inode;
void *private = RPC_I(dir)->private;
struct dentry *dentry;
int mode, i;
umode_t mode;
int i;

mutex_lock(&dir->i_mutex);
for (i = start; i < eof; i++) {
Expand Down Expand Up @@ -783,6 +784,12 @@ struct dentry *rpc_mkpipe(struct dentry *parent, const char *name,
struct dentry *dentry;
struct inode *dir, *inode;
struct rpc_inode *rpci;
umode_t umode = S_IFIFO | S_IRUSR | S_IWUSR;

if (ops->upcall == NULL)
umode &= ~S_IRUGO;
if (ops->downcall == NULL)
umode &= ~S_IWUGO;

dentry = rpc_lookup_create(parent, name, strlen(name), 0);
if (IS_ERR(dentry))
Expand All @@ -799,7 +806,7 @@ struct dentry *rpc_mkpipe(struct dentry *parent, const char *name,
rpci->nkern_readwriters++;
goto out;
}
inode = rpc_get_inode(dir->i_sb, S_IFIFO | S_IRUSR | S_IWUSR);
inode = rpc_get_inode(dir->i_sb, umode);
if (!inode)
goto err_dput;
inode->i_ino = iunique(dir->i_sb, 100);
Expand Down

0 comments on commit bcbf63c

Please sign in to comment.