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
d8ba7a36
Commit
d8ba7a36
authored
Oct 04, 2008
by
Alexey Dobriyan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
proc: move rest of /proc/locks to fs/locks.c
Signed-off-by:
Alexey Dobriyan
<
adobriyan@gmail.com
>
parent
ae048112
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
19 deletions
+21
-19
fs/locks.c
fs/locks.c
+21
-1
fs/proc/proc_misc.c
fs/proc/proc_misc.c
+0
-17
include/linux/fs.h
include/linux/fs.h
+0
-1
No files found.
fs/locks.c
View file @
d8ba7a36
...
...
@@ -2078,6 +2078,7 @@ int vfs_cancel_lock(struct file *filp, struct file_lock *fl)
EXPORT_SYMBOL_GPL
(
vfs_cancel_lock
);
#ifdef CONFIG_PROC_FS
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
static
void
lock_get_status
(
struct
seq_file
*
f
,
struct
file_lock
*
fl
,
...
...
@@ -2183,12 +2184,31 @@ static void locks_stop(struct seq_file *f, void *v)
unlock_kernel
();
}
struct
seq_operations
locks_seq_operations
=
{
st
atic
const
st
ruct
seq_operations
locks_seq_operations
=
{
.
start
=
locks_start
,
.
next
=
locks_next
,
.
stop
=
locks_stop
,
.
show
=
locks_show
,
};
static
int
locks_open
(
struct
inode
*
inode
,
struct
file
*
filp
)
{
return
seq_open
(
filp
,
&
locks_seq_operations
);
}
static
const
struct
file_operations
proc_locks_operations
=
{
.
open
=
locks_open
,
.
read
=
seq_read
,
.
llseek
=
seq_lseek
,
.
release
=
seq_release
,
};
static
int
__init
proc_locks_init
(
void
)
{
proc_create
(
"locks"
,
0
,
NULL
,
&
proc_locks_operations
);
return
0
;
}
module_init
(
proc_locks_init
);
#endif
/**
...
...
fs/proc/proc_misc.c
View file @
d8ba7a36
...
...
@@ -453,20 +453,6 @@ static const struct file_operations proc_interrupts_operations = {
.
release
=
seq_release
,
};
#ifdef CONFIG_FILE_LOCKING
static
int
locks_open
(
struct
inode
*
inode
,
struct
file
*
filp
)
{
return
seq_open
(
filp
,
&
locks_seq_operations
);
}
static
const
struct
file_operations
proc_locks_operations
=
{
.
open
=
locks_open
,
.
read
=
seq_read
,
.
llseek
=
seq_lseek
,
.
release
=
seq_release
,
};
#endif
/* CONFIG_FILE_LOCKING */
#ifdef CONFIG_PROC_PAGE_MONITOR
#define KPMSIZE sizeof(u64)
#define KPMMASK (KPMSIZE - 1)
...
...
@@ -605,9 +591,6 @@ void __init proc_misc_init(void)
proc_symlink
(
"mounts"
,
NULL
,
"self/mounts"
);
/* And now for trickier ones */
#ifdef CONFIG_FILE_LOCKING
proc_create
(
"locks"
,
0
,
NULL
,
&
proc_locks_operations
);
#endif
proc_create
(
"devices"
,
0
,
NULL
,
&
proc_devinfo_operations
);
proc_create
(
"cpuinfo"
,
0
,
NULL
,
&
proc_cpuinfo_operations
);
#ifdef CONFIG_BLOCK
...
...
include/linux/fs.h
View file @
d8ba7a36
...
...
@@ -1037,7 +1037,6 @@ extern int vfs_setlease(struct file *, long, struct file_lock **);
extern
int
lease_modify
(
struct
file_lock
**
,
int
);
extern
int
lock_may_read
(
struct
inode
*
,
loff_t
start
,
unsigned
long
count
);
extern
int
lock_may_write
(
struct
inode
*
,
loff_t
start
,
unsigned
long
count
);
extern
struct
seq_operations
locks_seq_operations
;
#else
/* !CONFIG_FILE_LOCKING */
#define fcntl_getlk(a, b) ({ -EINVAL; })
#define fcntl_setlk(a, b, c, d) ({ -EACCES; })
...
...
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