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
35cf7ba0
Commit
35cf7ba0
authored
Mar 22, 2010
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bury __put_super_and_need_restart()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
79893c17
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
31 deletions
+6
-31
fs/drop_caches.c
fs/drop_caches.c
+1
-0
fs/internal.h
fs/internal.h
+2
-0
fs/quota/quota.c
fs/quota/quota.c
+1
-0
fs/super.c
fs/super.c
+2
-28
include/linux/fs.h
include/linux/fs.h
+0
-3
No files found.
fs/drop_caches.c
View file @
35cf7ba0
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
#include <linux/writeback.h>
#include <linux/writeback.h>
#include <linux/sysctl.h>
#include <linux/sysctl.h>
#include <linux/gfp.h>
#include <linux/gfp.h>
#include "internal.h"
/* A global variable is a bit ugly, but it keeps the code simple */
/* A global variable is a bit ugly, but it keeps the code simple */
int
sysctl_drop_caches
;
int
sysctl_drop_caches
;
...
...
fs/internal.h
View file @
35cf7ba0
...
@@ -87,6 +87,8 @@ extern struct file *get_empty_filp(void);
...
@@ -87,6 +87,8 @@ extern struct file *get_empty_filp(void);
* super.c
* super.c
*/
*/
extern
int
do_remount_sb
(
struct
super_block
*
,
int
,
void
*
,
int
);
extern
int
do_remount_sb
(
struct
super_block
*
,
int
,
void
*
,
int
);
extern
void
__put_super
(
struct
super_block
*
sb
);
extern
void
put_super
(
struct
super_block
*
sb
);
/*
/*
* open.c
* open.c
...
...
fs/quota/quota.c
View file @
35cf7ba0
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
#include <linux/quotaops.h>
#include <linux/quotaops.h>
#include <linux/types.h>
#include <linux/types.h>
#include <linux/writeback.h>
#include <linux/writeback.h>
#include "../internal.h"
static
int
check_quotactl_permission
(
struct
super_block
*
sb
,
int
type
,
int
cmd
,
static
int
check_quotactl_permission
(
struct
super_block
*
sb
,
int
type
,
int
cmd
,
qid_t
id
)
qid_t
id
)
...
...
fs/super.c
View file @
35cf7ba0
...
@@ -127,40 +127,14 @@ static inline void destroy_super(struct super_block *s)
...
@@ -127,40 +127,14 @@ static inline void destroy_super(struct super_block *s)
/* Superblock refcounting */
/* Superblock refcounting */
/*
/*
* Drop a superblock's refcount. Returns non-zero if the superblock was
* Drop a superblock's refcount. The caller must hold sb_lock.
* destroyed. The caller must hold sb_lock.
*/
*/
int
__put_super
(
struct
super_block
*
sb
)
void
__put_super
(
struct
super_block
*
sb
)
{
{
int
ret
=
0
;
if
(
!--
sb
->
s_count
)
{
if
(
!--
sb
->
s_count
)
{
list_del_init
(
&
sb
->
s_list
);
list_del_init
(
&
sb
->
s_list
);
destroy_super
(
sb
);
destroy_super
(
sb
);
ret
=
1
;
}
return
ret
;
}
/*
* Drop a superblock's refcount.
* Returns non-zero if the superblock is about to be destroyed and
* at least is already removed from super_blocks list, so if we are
* making a loop through super blocks then we need to restart.
* The caller must hold sb_lock.
*/
int
__put_super_and_need_restart
(
struct
super_block
*
sb
)
{
/* check for race with generic_shutdown_super() */
if
(
list_empty
(
&
sb
->
s_instances
))
{
/* super block is removed, need to restart... */
__put_super
(
sb
);
return
1
;
}
}
/* can't be the last, since s_list is still in use */
sb
->
s_count
--
;
BUG_ON
(
sb
->
s_count
==
0
);
return
0
;
}
}
/**
/**
...
...
include/linux/fs.h
View file @
35cf7ba0
...
@@ -1778,9 +1778,6 @@ extern int get_sb_pseudo(struct file_system_type *, char *,
...
@@ -1778,9 +1778,6 @@ extern int get_sb_pseudo(struct file_system_type *, char *,
const
struct
super_operations
*
ops
,
unsigned
long
,
const
struct
super_operations
*
ops
,
unsigned
long
,
struct
vfsmount
*
mnt
);
struct
vfsmount
*
mnt
);
extern
void
simple_set_mnt
(
struct
vfsmount
*
mnt
,
struct
super_block
*
sb
);
extern
void
simple_set_mnt
(
struct
vfsmount
*
mnt
,
struct
super_block
*
sb
);
int
__put_super_and_need_restart
(
struct
super_block
*
sb
);
int
__put_super
(
struct
super_block
*
sb
);
void
put_super
(
struct
super_block
*
sb
);
/* Alas, no aliases. Too much hassle with bringing module.h everywhere */
/* Alas, no aliases. Too much hassle with bringing module.h everywhere */
#define fops_get(fops) \
#define fops_get(fops) \
...
...
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