Commit 46e76c1a authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://linux-scsi.bkbits.net/scsi-dledford

into home.transmeta.com:/home/torvalds/v2.5/linux
parents 5678448a dbc5be57
......@@ -961,13 +961,20 @@ asmlinkage long sys_swapoff(const char * specialfile)
unsigned short *swap_map;
struct file *swap_file, *victim;
struct address_space *mapping;
char * pathname;
int i, type, prev;
int err;
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
victim = filp_open(specialfile, O_RDWR, 0);
pathname = getname(specialfile);
err = PTR_ERR(pathname);
if (IS_ERR(pathname))
goto out;
victim = filp_open(pathname, O_RDWR, 0);
putname(pathname);
err = PTR_ERR(victim);
if (IS_ERR(victim))
goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment