Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
46e76c1a
Commit
46e76c1a
authored
Nov 24, 2002
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://linux-scsi.bkbits.net/scsi-dledford
into home.transmeta.com:/home/torvalds/v2.5/linux
parents
5678448a
dbc5be57
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
mm/swapfile.c
mm/swapfile.c
+8
-1
No files found.
mm/swapfile.c
View file @
46e76c1a
...
@@ -961,13 +961,20 @@ asmlinkage long sys_swapoff(const char * specialfile)
...
@@ -961,13 +961,20 @@ asmlinkage long sys_swapoff(const char * specialfile)
unsigned
short
*
swap_map
;
unsigned
short
*
swap_map
;
struct
file
*
swap_file
,
*
victim
;
struct
file
*
swap_file
,
*
victim
;
struct
address_space
*
mapping
;
struct
address_space
*
mapping
;
char
*
pathname
;
int
i
,
type
,
prev
;
int
i
,
type
,
prev
;
int
err
;
int
err
;
if
(
!
capable
(
CAP_SYS_ADMIN
))
if
(
!
capable
(
CAP_SYS_ADMIN
))
return
-
EPERM
;
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
);
err
=
PTR_ERR
(
victim
);
if
(
IS_ERR
(
victim
))
if
(
IS_ERR
(
victim
))
goto
out
;
goto
out
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment