Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 233897
b: refs/heads/master
c: be91bfe
h: refs/heads/master
i:
  233895: 7befe29
v: v3
  • Loading branch information
Linus Torvalds committed Mar 5, 2011
1 parent 5b478cd commit d08fd52
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 10 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: 73412c3854c877e5f37ad944ee8977addde4d35a
refs/heads/master: be91bfebf2940054e40850928d97859142b86556
2 changes: 1 addition & 1 deletion trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -3520,7 +3520,7 @@ F: drivers/hwmon/jc42.c
F: Documentation/hwmon/jc42

JFS FILESYSTEM
M: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
M: Dave Kleikamp <shaggy@kernel.org>
L: jfs-discussion@lists.sourceforge.net
W: http://jfs.sourceforge.net/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6.git
Expand Down
44 changes: 42 additions & 2 deletions trunk/fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#include <linux/sunrpc/bc_xprt.h>
#include <linux/xattr.h>
#include <linux/utsname.h>
#include <linux/mm.h>

#include "nfs4_fs.h"
#include "delegation.h"
Expand Down Expand Up @@ -3252,6 +3253,35 @@ static void buf_to_pages(const void *buf, size_t buflen,
}
}

static int buf_to_pages_noslab(const void *buf, size_t buflen,
struct page **pages, unsigned int *pgbase)
{
struct page *newpage, **spages;
int rc = 0;
size_t len;
spages = pages;

do {
len = min(PAGE_CACHE_SIZE, buflen);
newpage = alloc_page(GFP_KERNEL);

if (newpage == NULL)
goto unwind;
memcpy(page_address(newpage), buf, len);
buf += len;
buflen -= len;
*pages++ = newpage;
rc++;
} while (buflen != 0);

return rc;

unwind:
for(; rc > 0; rc--)
__free_page(spages[rc-1]);
return -ENOMEM;
}

struct nfs4_cached_acl {
int cached;
size_t len;
Expand Down Expand Up @@ -3420,13 +3450,23 @@ static int __nfs4_proc_set_acl(struct inode *inode, const void *buf, size_t bufl
.rpc_argp = &arg,
.rpc_resp = &res,
};
int ret;
int ret, i;

if (!nfs4_server_supports_acls(server))
return -EOPNOTSUPP;
i = buf_to_pages_noslab(buf, buflen, arg.acl_pages, &arg.acl_pgbase);
if (i < 0)
return i;
nfs_inode_return_delegation(inode);
buf_to_pages(buf, buflen, arg.acl_pages, &arg.acl_pgbase);
ret = nfs4_call_sync(server, &msg, &arg, &res, 1);

/*
* Free each page after tx, so the only ref left is
* held by the network stack
*/
for (; i > 0; i--)
put_page(pages[i-1]);

/*
* Acl update can result in inode attribute update.
* so mark the attribute cache invalid.
Expand Down
3 changes: 0 additions & 3 deletions trunk/include/linux/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,8 @@

extern long arch_ptrace(struct task_struct *child, long request,
unsigned long addr, unsigned long data);
extern int ptrace_traceme(void);
extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len);
extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len);
extern int ptrace_attach(struct task_struct *tsk);
extern int ptrace_detach(struct task_struct *, unsigned int);
extern void ptrace_disable(struct task_struct *);
extern int ptrace_check_attach(struct task_struct *task, int kill);
extern int ptrace_request(struct task_struct *child, long request,
Expand Down
6 changes: 3 additions & 3 deletions trunk/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ bool ptrace_may_access(struct task_struct *task, unsigned int mode)
return !err;
}

int ptrace_attach(struct task_struct *task)
static int ptrace_attach(struct task_struct *task)
{
int retval;

Expand Down Expand Up @@ -219,7 +219,7 @@ int ptrace_attach(struct task_struct *task)
* Performs checks and sets PT_PTRACED.
* Should be used by all ptrace implementations for PTRACE_TRACEME.
*/
int ptrace_traceme(void)
static int ptrace_traceme(void)
{
int ret = -EPERM;

Expand Down Expand Up @@ -293,7 +293,7 @@ static bool __ptrace_detach(struct task_struct *tracer, struct task_struct *p)
return false;
}

int ptrace_detach(struct task_struct *child, unsigned int data)
static int ptrace_detach(struct task_struct *child, unsigned int data)
{
bool dead = false;

Expand Down

0 comments on commit d08fd52

Please sign in to comment.