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
Kirill Smelkov
linux
Commits
eea87ac9
Commit
eea87ac9
authored
Nov 23, 2007
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import 2.4.0-test2pre6
parent
ebc24cd7
Changes
42
Hide whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
89 additions
and
231 deletions
+89
-231
drivers/isdn/avmb1/capifs.c
drivers/isdn/avmb1/capifs.c
+3
-3
fs/affs/inode.c
fs/affs/inode.c
+1
-1
fs/affs/namei.c
fs/affs/namei.c
+1
-1
fs/bfs/dir.c
fs/bfs/dir.c
+1
-1
fs/bfs/inode.c
fs/bfs/inode.c
+0
-2
fs/coda/cnode.c
fs/coda/cnode.c
+1
-1
fs/coda/dir.c
fs/coda/dir.c
+7
-6
fs/coda/inode.c
fs/coda/inode.c
+4
-4
fs/coda/pioctl.c
fs/coda/pioctl.c
+1
-1
fs/devpts/inode.c
fs/devpts/inode.c
+2
-2
fs/devpts/root.c
fs/devpts/root.c
+1
-1
fs/ext2/ialloc.c
fs/ext2/ialloc.c
+0
-18
fs/ext2/namei.c
fs/ext2/namei.c
+1
-1
fs/hfs/inode.c
fs/hfs/inode.c
+1
-1
fs/hpfs/inode.c
fs/hpfs/inode.c
+1
-1
fs/inode.c
fs/inode.c
+30
-18
fs/minix/bitmap.c
fs/minix/bitmap.c
+0
-18
fs/minix/namei.c
fs/minix/namei.c
+1
-1
fs/ncpfs/inode.c
fs/ncpfs/inode.c
+1
-8
fs/nfs/flushd.c
fs/nfs/flushd.c
+1
-1
fs/nfs/inode.c
fs/nfs/inode.c
+7
-19
fs/nfsd/nfsfh.c
fs/nfsd/nfsfh.c
+1
-1
fs/nfsd/vfs.c
fs/nfsd/vfs.c
+1
-7
fs/ntfs/fs.c
fs/ntfs/fs.c
+1
-1
fs/proc/inode.c
fs/proc/inode.c
+1
-11
fs/qnx4/bitmap.c
fs/qnx4/bitmap.c
+0
-19
fs/ramfs/inode.c
fs/ramfs/inode.c
+1
-1
fs/smbfs/inode.c
fs/smbfs/inode.c
+1
-14
fs/sysv/ialloc.c
fs/sysv/ialloc.c
+1
-21
fs/sysv/inode.c
fs/sysv/inode.c
+2
-1
fs/sysv/namei.c
fs/sysv/namei.c
+1
-1
fs/udf/ialloc.c
fs/udf/ialloc.c
+0
-21
fs/udf/namei.c
fs/udf/namei.c
+1
-1
fs/ufs/ialloc.c
fs/ufs/ialloc.c
+0
-11
fs/ufs/namei.c
fs/ufs/namei.c
+1
-1
fs/umsdos/dir.c
fs/umsdos/dir.c
+1
-1
fs/umsdos/inode.c
fs/umsdos/inode.c
+2
-2
fs/umsdos/namei.c
fs/umsdos/namei.c
+4
-4
include/linux/fs.h
include/linux/fs.h
+2
-1
include/linux/wrapper.h
include/linux/wrapper.h
+0
-3
kernel/ksyms.c
kernel/ksyms.c
+1
-0
mm/mmap.c
mm/mmap.c
+2
-0
No files found.
drivers/isdn/avmb1/capifs.c
View file @
eea87ac9
...
@@ -209,7 +209,7 @@ static struct dentry *capifs_root_lookup(struct inode * dir, struct dentry * den
...
@@ -209,7 +209,7 @@ static struct dentry *capifs_root_lookup(struct inode * dir, struct dentry * den
dentry
->
d_inode
=
np
->
inode
;
dentry
->
d_inode
=
np
->
inode
;
if
(
dentry
->
d_inode
)
if
(
dentry
->
d_inode
)
dentry
->
d_inode
->
i_count
++
;
atomic_inc
(
&
dentry
->
d_inode
->
i_count
)
;
d_add
(
dentry
,
dentry
->
d_inode
);
d_add
(
dentry
,
dentry
->
d_inode
);
...
@@ -228,9 +228,9 @@ static void capifs_put_super(struct super_block *sb)
...
@@ -228,9 +228,9 @@ static void capifs_put_super(struct super_block *sb)
for
(
i
=
0
;
i
<
sbi
->
max_ncci
;
i
++
)
{
for
(
i
=
0
;
i
<
sbi
->
max_ncci
;
i
++
)
{
if
(
(
inode
=
sbi
->
nccis
[
i
].
inode
)
)
{
if
(
(
inode
=
sbi
->
nccis
[
i
].
inode
)
)
{
if
(
inode
->
i_count
!=
1
)
if
(
atomic_read
(
&
inode
->
i_count
)
!=
1
)
printk
(
"capifs_put_super: badness: entry %d count %d
\n
"
,
printk
(
"capifs_put_super: badness: entry %d count %d
\n
"
,
i
,
inode
->
i_count
);
i
,
atomic_read
(
&
inode
->
i_count
)
);
inode
->
i_nlink
--
;
inode
->
i_nlink
--
;
iput
(
inode
);
iput
(
inode
);
}
}
...
...
fs/affs/inode.c
View file @
eea87ac9
...
@@ -270,7 +270,7 @@ affs_put_inode(struct inode *inode)
...
@@ -270,7 +270,7 @@ affs_put_inode(struct inode *inode)
inode
->
i_ino
,
inode
->
i_nlink
);
inode
->
i_ino
,
inode
->
i_nlink
);
affs_free_prealloc
(
inode
);
affs_free_prealloc
(
inode
);
if
(
inode
->
i_count
==
1
)
{
if
(
atomic_read
(
&
inode
->
i_count
)
==
1
)
{
unsigned
long
cache_page
=
(
unsigned
long
)
inode
->
u
.
affs_i
.
i_ec
;
unsigned
long
cache_page
=
(
unsigned
long
)
inode
->
u
.
affs_i
.
i_ec
;
if
(
cache_page
)
{
if
(
cache_page
)
{
pr_debug
(
"AFFS: freeing ext cache
\n
"
);
pr_debug
(
"AFFS: freeing ext cache
\n
"
);
...
...
fs/affs/namei.c
View file @
eea87ac9
...
@@ -512,7 +512,7 @@ affs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry)
...
@@ -512,7 +512,7 @@ affs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry)
dir
->
i_version
=
++
event
;
dir
->
i_version
=
++
event
;
mark_inode_dirty
(
dir
);
mark_inode_dirty
(
dir
);
mark_inode_dirty
(
oldinode
);
mark_inode_dirty
(
oldinode
);
oldinode
->
i_count
++
;
atomic_inc
(
&
oldinode
->
i_count
)
;
d_instantiate
(
dentry
,
oldinode
);
d_instantiate
(
dentry
,
oldinode
);
}
}
mark_inode_dirty
(
inode
);
mark_inode_dirty
(
inode
);
...
...
fs/bfs/dir.c
View file @
eea87ac9
...
@@ -152,7 +152,7 @@ static int bfs_link(struct dentry * old, struct inode * dir, struct dentry * new
...
@@ -152,7 +152,7 @@ static int bfs_link(struct dentry * old, struct inode * dir, struct dentry * new
inode
->
i_nlink
++
;
inode
->
i_nlink
++
;
inode
->
i_ctime
=
CURRENT_TIME
;
inode
->
i_ctime
=
CURRENT_TIME
;
mark_inode_dirty
(
inode
);
mark_inode_dirty
(
inode
);
inode
->
i_count
++
;
atomic_inc
(
&
inode
->
i_count
)
;
d_instantiate
(
new
,
inode
);
d_instantiate
(
new
,
inode
);
return
0
;
return
0
;
}
}
...
...
fs/bfs/inode.c
View file @
eea87ac9
...
@@ -139,8 +139,6 @@ static void bfs_delete_inode(struct inode * inode)
...
@@ -139,8 +139,6 @@ static void bfs_delete_inode(struct inode * inode)
dprintf
(
"ino=%08lx
\n
"
,
inode
->
i_ino
);
dprintf
(
"ino=%08lx
\n
"
,
inode
->
i_ino
);
if
(
!
inode
||
!
inode
->
i_dev
||
inode
->
i_count
>
1
||
inode
->
i_nlink
||
!
s
)
return
;
if
(
inode
->
i_ino
<
BFS_ROOT_INO
||
inode
->
i_ino
>
inode
->
i_sb
->
su_lasti
)
{
if
(
inode
->
i_ino
<
BFS_ROOT_INO
||
inode
->
i_ino
>
inode
->
i_sb
->
su_lasti
)
{
printf
(
"invalid ino=%08lx
\n
"
,
inode
->
i_ino
);
printf
(
"invalid ino=%08lx
\n
"
,
inode
->
i_ino
);
return
;
return
;
...
...
fs/coda/cnode.c
View file @
eea87ac9
...
@@ -139,7 +139,7 @@ int coda_cnode_make(struct inode **inode, ViceFid *fid, struct super_block *sb)
...
@@ -139,7 +139,7 @@ int coda_cnode_make(struct inode **inode, ViceFid *fid, struct super_block *sb)
if
(
coda_fideq
(
fid
,
&
cnp
->
c_fid
)
)
{
if
(
coda_fideq
(
fid
,
&
cnp
->
c_fid
)
)
{
CDEBUG
(
D_DOWNCALL
,
CDEBUG
(
D_DOWNCALL
,
"Done making inode: ino %ld, count %d with %s
\n
"
,
"Done making inode: ino %ld, count %d with %s
\n
"
,
(
*
inode
)
->
i_ino
,
(
*
inode
)
->
i_count
,
(
*
inode
)
->
i_ino
,
atomic_read
(
&
(
*
inode
)
->
i_count
)
,
coda_f2s
(
&
cnp
->
c_fid
));
coda_f2s
(
&
cnp
->
c_fid
));
EXIT
;
EXIT
;
return
0
;
return
0
;
...
...
fs/coda/dir.c
View file @
eea87ac9
...
@@ -117,7 +117,7 @@ static struct dentry *coda_lookup(struct inode *dir, struct dentry *entry)
...
@@ -117,7 +117,7 @@ static struct dentry *coda_lookup(struct inode *dir, struct dentry *entry)
error
=
coda_cnode_makectl
(
&
res_inode
,
dir
->
i_sb
);
error
=
coda_cnode_makectl
(
&
res_inode
,
dir
->
i_sb
);
CDEBUG
(
D_SPECIAL
,
CDEBUG
(
D_SPECIAL
,
"Lookup on CTL object; dir ino %ld, count %d
\n
"
,
"Lookup on CTL object; dir ino %ld, count %d
\n
"
,
dir
->
i_ino
,
dir
->
i_count
);
dir
->
i_ino
,
atomic_read
(
&
dir
->
i_count
)
);
goto
exit
;
goto
exit
;
}
}
...
@@ -358,7 +358,7 @@ static int coda_link(struct dentry *source_de, struct inode *dir_inode,
...
@@ -358,7 +358,7 @@ static int coda_link(struct dentry *source_de, struct inode *dir_inode,
if
(
!
error
)
{
if
(
!
error
)
{
dir_cnp
->
c_flags
|=
C_VATTR
;
dir_cnp
->
c_flags
|=
C_VATTR
;
++
inode
->
i_count
;
atomic_inc
(
&
inode
->
i_count
)
;
d_instantiate
(
de
,
inode
);
d_instantiate
(
de
,
inode
);
inode
->
i_nlink
++
;
inode
->
i_nlink
++
;
}
else
{
}
else
{
...
@@ -597,9 +597,9 @@ int coda_open(struct inode *i, struct file *f)
...
@@ -597,9 +597,9 @@ int coda_open(struct inode *i, struct file *f)
cnp
->
c_ocount
++
;
cnp
->
c_ocount
++
;
CDEBUG
(
D_FILE
,
"result %d, coda i->i_count is %d for ino %ld
\n
"
,
CDEBUG
(
D_FILE
,
"result %d, coda i->i_count is %d for ino %ld
\n
"
,
error
,
i
->
i_count
,
i
->
i_ino
);
error
,
atomic_read
(
&
i
->
i_count
)
,
i
->
i_ino
);
CDEBUG
(
D_FILE
,
"cache ino: %ld, count %d, ops %p
\n
"
,
CDEBUG
(
D_FILE
,
"cache ino: %ld, count %d, ops %p
\n
"
,
cnp
->
c_ovp
->
i_ino
,
cnp
->
c_ovp
->
i_count
,
cnp
->
c_ovp
->
i_ino
,
atomic_read
(
&
cnp
->
c_ovp
->
i_count
)
,
(
cnp
->
c_ovp
->
i_op
));
(
cnp
->
c_ovp
->
i_op
));
EXIT
;
EXIT
;
return
0
;
return
0
;
...
@@ -622,8 +622,9 @@ int coda_release(struct inode *i, struct file *f)
...
@@ -622,8 +622,9 @@ int coda_release(struct inode *i, struct file *f)
CHECK_CNODE
(
cnp
);
CHECK_CNODE
(
cnp
);
CDEBUG
(
D_FILE
,
CDEBUG
(
D_FILE
,
"RELEASE coda (ino %ld, ct %d) cache (ino %ld, ct %d)
\n
"
,
"RELEASE coda (ino %ld, ct %d) cache (ino %ld, ct %d)
\n
"
,
i
->
i_ino
,
i
->
i_count
,
(
cnp
->
c_ovp
?
cnp
->
c_ovp
->
i_ino
:
0
),
i
->
i_ino
,
atomic_read
(
&
i
->
i_count
),
(
cnp
->
c_ovp
?
cnp
->
c_ovp
->
i_count
:
-
99
));
(
cnp
->
c_ovp
?
cnp
->
c_ovp
->
i_ino
:
0
),
(
cnp
->
c_ovp
?
atomic_read
(
&
cnp
->
c_ovp
->
i_count
)
:
-
99
));
/* even when c_ocount=0 we cannot put c_ovp to
/* even when c_ocount=0 we cannot put c_ovp to
...
...
fs/coda/inode.c
View file @
eea87ac9
...
@@ -148,9 +148,9 @@ static void coda_put_inode(struct inode *inode)
...
@@ -148,9 +148,9 @@ static void coda_put_inode(struct inode *inode)
{
{
ENTRY
;
ENTRY
;
CDEBUG
(
D_INODE
,
"ino: %ld, count %d
\n
"
,
inode
->
i_ino
,
inode
->
i_count
);
CDEBUG
(
D_INODE
,
"ino: %ld, count %d
\n
"
,
inode
->
i_ino
,
atomic_read
(
&
inode
->
i_count
)
);
if
(
inode
->
i_count
==
1
)
{
if
(
atomic_read
(
&
inode
->
i_count
)
==
1
)
{
write_inode_now
(
inode
);
write_inode_now
(
inode
);
inode
->
i_nlink
=
0
;
inode
->
i_nlink
=
0
;
}
}
...
@@ -163,7 +163,7 @@ static void coda_delete_inode(struct inode *inode)
...
@@ -163,7 +163,7 @@ static void coda_delete_inode(struct inode *inode)
ENTRY
;
ENTRY
;
CDEBUG
(
D_SUPER
,
" inode->ino: %ld, count: %d
\n
"
,
CDEBUG
(
D_SUPER
,
" inode->ino: %ld, count: %d
\n
"
,
inode
->
i_ino
,
inode
->
i_count
);
inode
->
i_ino
,
atomic_read
(
&
inode
->
i_count
)
);
cii
=
ITOC
(
inode
);
cii
=
ITOC
(
inode
);
if
(
inode
->
i_ino
==
CTL_INO
||
cii
->
c_magic
!=
CODA_CNODE_MAGIC
)
{
if
(
inode
->
i_ino
==
CTL_INO
||
cii
->
c_magic
!=
CODA_CNODE_MAGIC
)
{
...
@@ -179,7 +179,7 @@ static void coda_delete_inode(struct inode *inode)
...
@@ -179,7 +179,7 @@ static void coda_delete_inode(struct inode *inode)
open_inode
=
cii
->
c_ovp
;
open_inode
=
cii
->
c_ovp
;
if
(
open_inode
)
{
if
(
open_inode
)
{
CDEBUG
(
D_SUPER
,
"DELINO cached file: ino %ld count %d.
\n
"
,
CDEBUG
(
D_SUPER
,
"DELINO cached file: ino %ld count %d.
\n
"
,
open_inode
->
i_ino
,
open_inode
->
i_count
);
open_inode
->
i_ino
,
atomic_read
(
&
open_inode
->
i_count
)
);
cii
->
c_ovp
=
NULL
;
cii
->
c_ovp
=
NULL
;
inode
->
i_mapping
=
&
inode
->
i_data
;
inode
->
i_mapping
=
&
inode
->
i_data
;
iput
(
open_inode
);
iput
(
open_inode
);
...
...
fs/coda/pioctl.c
View file @
eea87ac9
...
@@ -120,7 +120,7 @@ static int coda_pioctl(struct inode * inode, struct file * filp,
...
@@ -120,7 +120,7 @@ static int coda_pioctl(struct inode * inode, struct file * filp,
CDEBUG
(
D_PIOCTL
,
"ioctl on inode %ld
\n
"
,
target_inode
->
i_ino
);
CDEBUG
(
D_PIOCTL
,
"ioctl on inode %ld
\n
"
,
target_inode
->
i_ino
);
CDEBUG
(
D_DOWNCALL
,
"dput on ino: %ld, icount %d, dcount %d
\n
"
,
target_inode
->
i_ino
,
CDEBUG
(
D_DOWNCALL
,
"dput on ino: %ld, icount %d, dcount %d
\n
"
,
target_inode
->
i_ino
,
target_inode
->
i_count
,
nd
.
dentry
->
d_count
);
atomic_read
(
&
target_inode
->
i_count
)
,
nd
.
dentry
->
d_count
);
path_release
(
&
nd
);
path_release
(
&
nd
);
return
error
;
return
error
;
}
}
...
...
fs/devpts/inode.c
View file @
eea87ac9
...
@@ -37,9 +37,9 @@ static void devpts_put_super(struct super_block *sb)
...
@@ -37,9 +37,9 @@ static void devpts_put_super(struct super_block *sb)
for
(
i
=
0
;
i
<
sbi
->
max_ptys
;
i
++
)
{
for
(
i
=
0
;
i
<
sbi
->
max_ptys
;
i
++
)
{
if
(
(
inode
=
sbi
->
inodes
[
i
])
)
{
if
(
(
inode
=
sbi
->
inodes
[
i
])
)
{
if
(
inode
->
i_count
!=
1
)
if
(
atomic_read
(
&
inode
->
i_count
)
!=
1
)
printk
(
"devpts_put_super: badness: entry %d count %d
\n
"
,
printk
(
"devpts_put_super: badness: entry %d count %d
\n
"
,
i
,
inode
->
i_count
);
i
,
atomic_read
(
&
inode
->
i_count
)
);
inode
->
i_nlink
--
;
inode
->
i_nlink
--
;
iput
(
inode
);
iput
(
inode
);
}
}
...
...
fs/devpts/root.c
View file @
eea87ac9
...
@@ -129,7 +129,7 @@ static struct dentry *devpts_root_lookup(struct inode * dir, struct dentry * den
...
@@ -129,7 +129,7 @@ static struct dentry *devpts_root_lookup(struct inode * dir, struct dentry * den
dentry
->
d_inode
=
sbi
->
inodes
[
entry
];
dentry
->
d_inode
=
sbi
->
inodes
[
entry
];
if
(
dentry
->
d_inode
)
if
(
dentry
->
d_inode
)
dentry
->
d_inode
->
i_count
++
;
atomic_inc
(
&
dentry
->
d_inode
->
i_count
)
;
d_add
(
dentry
,
dentry
->
d_inode
);
d_add
(
dentry
,
dentry
->
d_inode
);
...
...
fs/ext2/ialloc.c
View file @
eea87ac9
...
@@ -186,24 +186,6 @@ void ext2_free_inode (struct inode * inode)
...
@@ -186,24 +186,6 @@ void ext2_free_inode (struct inode * inode)
struct
ext2_group_desc
*
gdp
;
struct
ext2_group_desc
*
gdp
;
struct
ext2_super_block
*
es
;
struct
ext2_super_block
*
es
;
if
(
!
inode
->
i_dev
)
{
printk
(
"ext2_free_inode: inode has no device
\n
"
);
return
;
}
if
(
inode
->
i_count
>
1
)
{
printk
(
"ext2_free_inode: inode has count=%d
\n
"
,
inode
->
i_count
);
return
;
}
if
(
inode
->
i_nlink
)
{
printk
(
"ext2_free_inode: inode has nlink=%d
\n
"
,
inode
->
i_nlink
);
return
;
}
if
(
!
sb
)
{
printk
(
"ext2_free_inode: inode on nonexistent device
\n
"
);
return
;
}
ino
=
inode
->
i_ino
;
ino
=
inode
->
i_ino
;
ext2_debug
(
"freeing inode %lu
\n
"
,
ino
);
ext2_debug
(
"freeing inode %lu
\n
"
,
ino
);
...
...
fs/ext2/namei.c
View file @
eea87ac9
...
@@ -685,7 +685,7 @@ static int ext2_link (struct dentry * old_dentry,
...
@@ -685,7 +685,7 @@ static int ext2_link (struct dentry * old_dentry,
inode
->
i_nlink
++
;
inode
->
i_nlink
++
;
inode
->
i_ctime
=
CURRENT_TIME
;
inode
->
i_ctime
=
CURRENT_TIME
;
mark_inode_dirty
(
inode
);
mark_inode_dirty
(
inode
);
inode
->
i_count
++
;
atomic_inc
(
&
inode
->
i_count
)
;
d_instantiate
(
dentry
,
inode
);
d_instantiate
(
dentry
,
inode
);
return
0
;
return
0
;
}
}
...
...
fs/hfs/inode.c
View file @
eea87ac9
...
@@ -80,7 +80,7 @@ void hfs_put_inode(struct inode * inode)
...
@@ -80,7 +80,7 @@ void hfs_put_inode(struct inode * inode)
struct
hfs_cat_entry
*
entry
=
HFS_I
(
inode
)
->
entry
;
struct
hfs_cat_entry
*
entry
=
HFS_I
(
inode
)
->
entry
;
hfs_cat_put
(
entry
);
hfs_cat_put
(
entry
);
if
(
inode
->
i_count
==
1
)
{
if
(
atomic_read
(
&
inode
->
i_count
)
==
1
)
{
struct
hfs_hdr_layout
*
tmp
=
HFS_I
(
inode
)
->
layout
;
struct
hfs_hdr_layout
*
tmp
=
HFS_I
(
inode
)
->
layout
;
if
(
tmp
)
{
if
(
tmp
)
{
...
...
fs/hpfs/inode.c
View file @
eea87ac9
...
@@ -233,7 +233,7 @@ void hpfs_write_inode(struct inode *i)
...
@@ -233,7 +233,7 @@ void hpfs_write_inode(struct inode *i)
struct
inode
*
parent
;
struct
inode
*
parent
;
if
(
!
i
->
i_nlink
)
return
;
if
(
!
i
->
i_nlink
)
return
;
if
(
i
->
i_ino
==
i
->
i_sb
->
s_hpfs_root
)
return
;
if
(
i
->
i_ino
==
i
->
i_sb
->
s_hpfs_root
)
return
;
if
(
i
->
i_hpfs_rddir_off
&&
!
i
->
i_count
)
{
if
(
i
->
i_hpfs_rddir_off
&&
!
atomic_read
(
&
i
->
i_count
)
)
{
if
(
*
i
->
i_hpfs_rddir_off
)
printk
(
"HPFS: write_inode: some position still there
\n
"
);
if
(
*
i
->
i_hpfs_rddir_off
)
printk
(
"HPFS: write_inode: some position still there
\n
"
);
kfree
(
i
->
i_hpfs_rddir_off
);
kfree
(
i
->
i_hpfs_rddir_off
);
i
->
i_hpfs_rddir_off
=
NULL
;
i
->
i_hpfs_rddir_off
=
NULL
;
...
...
fs/inode.c
View file @
eea87ac9
...
@@ -170,15 +170,16 @@ static inline void write_inode(struct inode *inode)
...
@@ -170,15 +170,16 @@ static inline void write_inode(struct inode *inode)
static
inline
void
__iget
(
struct
inode
*
inode
)
static
inline
void
__iget
(
struct
inode
*
inode
)
{
{
if
(
!
inode
->
i_count
++
)
if
(
atomic_read
(
&
inode
->
i_count
))
{
{
atomic_inc
(
&
inode
->
i_count
);
if
(
!
(
inode
->
i_state
&
I_DIRTY
))
return
;
{
}
list_del
(
&
inode
->
i_lis
t
);
atomic_inc
(
&
inode
->
i_coun
t
);
list_add
(
&
inode
->
i_list
,
&
inode_in_use
);
if
(
!
(
inode
->
i_state
&
I_DIRTY
))
{
}
list_del
(
&
inode
->
i_list
);
inodes_stat
.
nr_unused
--
;
list_add
(
&
inode
->
i_list
,
&
inode_in_use
)
;
}
}
inodes_stat
.
nr_unused
--
;
}
}
static
inline
void
sync_one
(
struct
inode
*
inode
)
static
inline
void
sync_one
(
struct
inode
*
inode
)
...
@@ -191,8 +192,9 @@ static inline void sync_one(struct inode *inode)
...
@@ -191,8 +192,9 @@ static inline void sync_one(struct inode *inode)
spin_lock
(
&
inode_lock
);
spin_lock
(
&
inode_lock
);
}
else
{
}
else
{
list_del
(
&
inode
->
i_list
);
list_del
(
&
inode
->
i_list
);
list_add
(
&
inode
->
i_list
,
list_add
(
&
inode
->
i_list
,
atomic_read
(
&
inode
->
i_count
)
inode
->
i_count
?
&
inode_in_use
:
&
inode_unused
);
?
&
inode_in_use
:
&
inode_unused
);
/* Set I_LOCK, reset I_DIRTY */
/* Set I_LOCK, reset I_DIRTY */
inode
->
i_state
^=
I_DIRTY
|
I_LOCK
;
inode
->
i_state
^=
I_DIRTY
|
I_LOCK
;
spin_unlock
(
&
inode_lock
);
spin_unlock
(
&
inode_lock
);
...
@@ -347,7 +349,7 @@ static int invalidate_list(struct list_head *head, struct super_block * sb, stru
...
@@ -347,7 +349,7 @@ static int invalidate_list(struct list_head *head, struct super_block * sb, stru
inode
=
list_entry
(
tmp
,
struct
inode
,
i_list
);
inode
=
list_entry
(
tmp
,
struct
inode
,
i_list
);
if
(
inode
->
i_sb
!=
sb
)
if
(
inode
->
i_sb
!=
sb
)
continue
;
continue
;
if
(
!
inode
->
i_count
)
{
if
(
!
atomic_read
(
&
inode
->
i_count
)
)
{
list_del
(
&
inode
->
i_hash
);
list_del
(
&
inode
->
i_hash
);
INIT_LIST_HEAD
(
&
inode
->
i_hash
);
INIT_LIST_HEAD
(
&
inode
->
i_hash
);
list_del
(
&
inode
->
i_list
);
list_del
(
&
inode
->
i_list
);
...
@@ -433,7 +435,7 @@ void prune_icache(int goal)
...
@@ -433,7 +435,7 @@ void prune_icache(int goal)
BUG
();
BUG
();
if
(
!
CAN_UNUSE
(
inode
))
if
(
!
CAN_UNUSE
(
inode
))
continue
;
continue
;
if
(
inode
->
i_count
)
if
(
atomic_read
(
&
inode
->
i_count
)
)
BUG
();
BUG
();
list_del
(
tmp
);
list_del
(
tmp
);
list_del
(
&
inode
->
i_hash
);
list_del
(
&
inode
->
i_hash
);
...
@@ -551,7 +553,7 @@ struct inode * get_empty_inode(void)
...
@@ -551,7 +553,7 @@ struct inode * get_empty_inode(void)
inode
->
i_dev
=
0
;
inode
->
i_dev
=
0
;
inode
->
i_ino
=
++
last_ino
;
inode
->
i_ino
=
++
last_ino
;
inode
->
i_flags
=
0
;
inode
->
i_flags
=
0
;
inode
->
i_count
=
1
;
atomic_set
(
&
inode
->
i_count
,
1
)
;
inode
->
i_state
=
0
;
inode
->
i_state
=
0
;
spin_unlock
(
&
inode_lock
);
spin_unlock
(
&
inode_lock
);
clean_inode
(
inode
);
clean_inode
(
inode
);
...
@@ -583,7 +585,7 @@ static struct inode * get_new_inode(struct super_block *sb, unsigned long ino, s
...
@@ -583,7 +585,7 @@ static struct inode * get_new_inode(struct super_block *sb, unsigned long ino, s
inode
->
i_dev
=
sb
->
s_dev
;
inode
->
i_dev
=
sb
->
s_dev
;
inode
->
i_ino
=
ino
;
inode
->
i_ino
=
ino
;
inode
->
i_flags
=
0
;
inode
->
i_flags
=
0
;
inode
->
i_count
=
1
;
atomic_set
(
&
inode
->
i_count
,
1
)
;
inode
->
i_state
=
I_LOCK
;
inode
->
i_state
=
I_LOCK
;
spin_unlock
(
&
inode_lock
);
spin_unlock
(
&
inode_lock
);
...
@@ -758,7 +760,7 @@ void iput(struct inode *inode)
...
@@ -758,7 +760,7 @@ void iput(struct inode *inode)
op
->
put_inode
(
inode
);
op
->
put_inode
(
inode
);
spin_lock
(
&
inode_lock
);
spin_lock
(
&
inode_lock
);
if
(
!--
inode
->
i_count
)
{
if
(
atomic_dec_and_test
(
&
inode
->
i_count
)
)
{
if
(
!
inode
->
i_nlink
)
{
if
(
!
inode
->
i_nlink
)
{
list_del
(
&
inode
->
i_hash
);
list_del
(
&
inode
->
i_hash
);
INIT_LIST_HEAD
(
&
inode
->
i_hash
);
INIT_LIST_HEAD
(
&
inode
->
i_hash
);
...
@@ -807,15 +809,15 @@ kdevname(inode->i_dev), inode->i_ino);
...
@@ -807,15 +809,15 @@ kdevname(inode->i_dev), inode->i_ino);
if
(
!
list_empty
(
&
inode
->
i_dentry
))
if
(
!
list_empty
(
&
inode
->
i_dentry
))
printk
(
KERN_ERR
"iput: device %s inode %ld still has aliases!
\n
"
,
printk
(
KERN_ERR
"iput: device %s inode %ld still has aliases!
\n
"
,
kdevname
(
inode
->
i_dev
),
inode
->
i_ino
);
kdevname
(
inode
->
i_dev
),
inode
->
i_ino
);
if
(
inode
->
i_count
)
if
(
atomic_read
(
&
inode
->
i_count
)
)
printk
(
KERN_ERR
"iput: device %s inode %ld count changed, count=%d
\n
"
,
printk
(
KERN_ERR
"iput: device %s inode %ld count changed, count=%d
\n
"
,
kdevname
(
inode
->
i_dev
),
inode
->
i_ino
,
inode
->
i_count
);
kdevname
(
inode
->
i_dev
),
inode
->
i_ino
,
atomic_read
(
&
inode
->
i_count
)
);
if
(
atomic_read
(
&
inode
->
i_sem
.
count
)
!=
1
)
if
(
atomic_read
(
&
inode
->
i_sem
.
count
)
!=
1
)
printk
(
KERN_ERR
"iput: Aieee, semaphore in use inode %s/%ld, count=%d
\n
"
,
printk
(
KERN_ERR
"iput: Aieee, semaphore in use inode %s/%ld, count=%d
\n
"
,
kdevname
(
inode
->
i_dev
),
inode
->
i_ino
,
atomic_read
(
&
inode
->
i_sem
.
count
));
kdevname
(
inode
->
i_dev
),
inode
->
i_ino
,
atomic_read
(
&
inode
->
i_sem
.
count
));
#endif
#endif
}
}
if
(
inode
->
i_count
>
(
1
<<
31
))
{
if
(
(
unsigned
)
atomic_read
(
&
inode
->
i_count
)
>
(
1U
<<
31
))
{
printk
(
KERN_ERR
"iput: inode %s/%ld count wrapped
\n
"
,
printk
(
KERN_ERR
"iput: inode %s/%ld count wrapped
\n
"
,
kdevname
(
inode
->
i_dev
),
inode
->
i_ino
);
kdevname
(
inode
->
i_dev
),
inode
->
i_ino
);
}
}
...
@@ -825,6 +827,16 @@ kdevname(inode->i_dev), inode->i_ino, atomic_read(&inode->i_sem.count));
...
@@ -825,6 +827,16 @@ kdevname(inode->i_dev), inode->i_ino, atomic_read(&inode->i_sem.count));
}
}
}
}
void
force_delete
(
struct
inode
*
inode
)
{
/*
* Kill off unused inodes ... iput() will unhash and
* delete the inode if we set i_nlink to zero.
*/
if
(
atomic_read
(
&
inode
->
i_count
)
==
1
)
inode
->
i_nlink
=
0
;
}
/**
/**
* bmap - find a block number in a file
* bmap - find a block number in a file
* @inode: inode of file
* @inode: inode of file
...
...
fs/minix/bitmap.c
View file @
eea87ac9
...
@@ -205,24 +205,6 @@ void minix_free_inode(struct inode * inode)
...
@@ -205,24 +205,6 @@ void minix_free_inode(struct inode * inode)
struct
buffer_head
*
bh
;
struct
buffer_head
*
bh
;
unsigned
long
ino
;
unsigned
long
ino
;
if
(
!
inode
)
return
;
if
(
!
inode
->
i_dev
)
{
printk
(
"free_inode: inode has no device
\n
"
);
return
;
}
if
(
inode
->
i_count
>
1
)
{
printk
(
"free_inode: inode has count=%d
\n
"
,
inode
->
i_count
);
return
;
}
if
(
inode
->
i_nlink
)
{
printk
(
"free_inode: inode has nlink=%d
\n
"
,
inode
->
i_nlink
);
return
;
}
if
(
!
inode
->
i_sb
)
{
printk
(
"free_inode: inode on nonexistent device
\n
"
);
return
;
}
if
(
inode
->
i_ino
<
1
||
inode
->
i_ino
>
inode
->
i_sb
->
u
.
minix_sb
.
s_ninodes
)
{
if
(
inode
->
i_ino
<
1
||
inode
->
i_ino
>
inode
->
i_sb
->
u
.
minix_sb
.
s_ninodes
)
{
printk
(
"free_inode: inode 0 or nonexistent inode
\n
"
);
printk
(
"free_inode: inode 0 or nonexistent inode
\n
"
);
return
;
return
;
...
...
fs/minix/namei.c
View file @
eea87ac9
...
@@ -520,7 +520,7 @@ static int minix_link(struct dentry * old_dentry, struct inode * dir,
...
@@ -520,7 +520,7 @@ static int minix_link(struct dentry * old_dentry, struct inode * dir,
inode
->
i_nlink
++
;
inode
->
i_nlink
++
;
inode
->
i_ctime
=
CURRENT_TIME
;
inode
->
i_ctime
=
CURRENT_TIME
;
mark_inode_dirty
(
inode
);
mark_inode_dirty
(
inode
);
inode
->
i_count
++
;
atomic_inc
(
&
inode
->
i_count
)
;
d_instantiate
(
dentry
,
inode
);
d_instantiate
(
dentry
,
inode
);
return
0
;
return
0
;
}
}
...
...
fs/ncpfs/inode.c
View file @
eea87ac9
...
@@ -31,14 +31,13 @@
...
@@ -31,14 +31,13 @@
#include "ncplib_kernel.h"
#include "ncplib_kernel.h"
static
void
ncp_put_inode
(
struct
inode
*
);
static
void
ncp_delete_inode
(
struct
inode
*
);
static
void
ncp_delete_inode
(
struct
inode
*
);
static
void
ncp_put_super
(
struct
super_block
*
);
static
void
ncp_put_super
(
struct
super_block
*
);
static
int
ncp_statfs
(
struct
super_block
*
,
struct
statfs
*
);
static
int
ncp_statfs
(
struct
super_block
*
,
struct
statfs
*
);
static
struct
super_operations
ncp_sops
=
static
struct
super_operations
ncp_sops
=
{
{
put_inode:
ncp_put_inod
e
,
put_inode:
force_delet
e
,
delete_inode:
ncp_delete_inode
,
delete_inode:
ncp_delete_inode
,
put_super:
ncp_put_super
,
put_super:
ncp_put_super
,
statfs:
ncp_statfs
,
statfs:
ncp_statfs
,
...
@@ -239,12 +238,6 @@ ncp_iget(struct super_block *sb, struct ncp_entry_info *info)
...
@@ -239,12 +238,6 @@ ncp_iget(struct super_block *sb, struct ncp_entry_info *info)
return
inode
;
return
inode
;
}
}
static
void
ncp_put_inode
(
struct
inode
*
inode
)
{
if
(
inode
->
i_count
==
1
)
inode
->
i_nlink
=
0
;
}
static
void
static
void
ncp_delete_inode
(
struct
inode
*
inode
)
ncp_delete_inode
(
struct
inode
*
inode
)
{
{
...
...
fs/nfs/flushd.c
View file @
eea87ac9
...
@@ -175,7 +175,7 @@ static void inode_append_flushd(struct inode *inode)
...
@@ -175,7 +175,7 @@ static void inode_append_flushd(struct inode *inode)
* it from disappearing when on the flush list
* it from disappearing when on the flush list
*/
*/
NFS_FLAGS
(
inode
)
|=
NFS_INO_FLUSH
;
NFS_FLAGS
(
inode
)
|=
NFS_INO_FLUSH
;
inode
->
i_count
++
;
atomic_inc
(
&
inode
->
i_count
)
;
out:
out:
spin_unlock
(
&
nfs_flushd_lock
);
spin_unlock
(
&
nfs_flushd_lock
);
}
}
...
...
fs/nfs/inode.c
View file @
eea87ac9
...
@@ -44,7 +44,6 @@ void nfs_zap_caches(struct inode *);
...
@@ -44,7 +44,6 @@ void nfs_zap_caches(struct inode *);
static
void
nfs_invalidate_inode
(
struct
inode
*
);
static
void
nfs_invalidate_inode
(
struct
inode
*
);
static
void
nfs_read_inode
(
struct
inode
*
);
static
void
nfs_read_inode
(
struct
inode
*
);
static
void
nfs_put_inode
(
struct
inode
*
);
static
void
nfs_delete_inode
(
struct
inode
*
);
static
void
nfs_delete_inode
(
struct
inode
*
);
static
void
nfs_put_super
(
struct
super_block
*
);
static
void
nfs_put_super
(
struct
super_block
*
);
static
void
nfs_umount_begin
(
struct
super_block
*
);
static
void
nfs_umount_begin
(
struct
super_block
*
);
...
@@ -52,7 +51,7 @@ static int nfs_statfs(struct super_block *, struct statfs *);
...
@@ -52,7 +51,7 @@ static int nfs_statfs(struct super_block *, struct statfs *);
static
struct
super_operations
nfs_sops
=
{
static
struct
super_operations
nfs_sops
=
{
read_inode:
nfs_read_inode
,
read_inode:
nfs_read_inode
,
put_inode:
nfs_put_inod
e
,
put_inode:
force_delet
e
,
delete_inode:
nfs_delete_inode
,
delete_inode:
nfs_delete_inode
,
put_super:
nfs_put_super
,
put_super:
nfs_put_super
,
statfs:
nfs_statfs
,
statfs:
nfs_statfs
,
...
@@ -114,17 +113,6 @@ nfs_read_inode(struct inode * inode)
...
@@ -114,17 +113,6 @@ nfs_read_inode(struct inode * inode)
NFS_ATTRTIMEO_UPDATE
(
inode
)
=
jiffies
;
NFS_ATTRTIMEO_UPDATE
(
inode
)
=
jiffies
;
}
}
static
void
nfs_put_inode
(
struct
inode
*
inode
)
{
dprintk
(
"NFS: put_inode(%x/%ld)
\n
"
,
inode
->
i_dev
,
inode
->
i_ino
);
/*
* We want to get rid of unused inodes ...
*/
if
(
inode
->
i_count
==
1
)
inode
->
i_nlink
=
0
;
}
static
void
static
void
nfs_delete_inode
(
struct
inode
*
inode
)
nfs_delete_inode
(
struct
inode
*
inode
)
{
{
...
@@ -690,7 +678,7 @@ nfs_inode_is_stale(struct inode *inode, struct nfs_fattr *fattr)
...
@@ -690,7 +678,7 @@ nfs_inode_is_stale(struct inode *inode, struct nfs_fattr *fattr)
* don't invalidate their inodes even if all dentries are
* don't invalidate their inodes even if all dentries are
* unhashed.
* unhashed.
*/
*/
if
(
unhashed
&&
inode
->
i_count
==
unhashed
+
1
if
(
unhashed
&&
atomic_read
(
&
inode
->
i_count
)
==
unhashed
+
1
&&
!
S_ISSOCK
(
inode
->
i_mode
)
&&
!
S_ISFIFO
(
inode
->
i_mode
))
&&
!
S_ISSOCK
(
inode
->
i_mode
)
&&
!
S_ISFIFO
(
inode
->
i_mode
))
is_stale
=
1
;
is_stale
=
1
;
...
@@ -784,7 +772,7 @@ __nfs_fhget(struct super_block *sb, struct nfs_fattr *fattr)
...
@@ -784,7 +772,7 @@ __nfs_fhget(struct super_block *sb, struct nfs_fattr *fattr)
break
;
break
;
dprintk
(
"__nfs_fhget: inode %ld still busy, i_count=%d
\n
"
,
dprintk
(
"__nfs_fhget: inode %ld still busy, i_count=%d
\n
"
,
inode
->
i_ino
,
inode
->
i_count
);
inode
->
i_ino
,
atomic_read
(
&
inode
->
i_count
)
);
nfs_zap_caches
(
inode
);
nfs_zap_caches
(
inode
);
remove_inode_hash
(
inode
);
remove_inode_hash
(
inode
);
iput
(
inode
);
iput
(
inode
);
...
@@ -795,7 +783,7 @@ __nfs_fhget(struct super_block *sb, struct nfs_fattr *fattr)
...
@@ -795,7 +783,7 @@ __nfs_fhget(struct super_block *sb, struct nfs_fattr *fattr)
nfs_fill_inode
(
inode
,
fattr
);
nfs_fill_inode
(
inode
,
fattr
);
dprintk
(
"NFS: __nfs_fhget(%x/%ld ct=%d)
\n
"
,
dprintk
(
"NFS: __nfs_fhget(%x/%ld ct=%d)
\n
"
,
inode
->
i_dev
,
inode
->
i_ino
,
inode
->
i_count
);
inode
->
i_dev
,
inode
->
i_ino
,
atomic_read
(
&
inode
->
i_count
)
);
out:
out:
return
inode
;
return
inode
;
...
@@ -870,7 +858,7 @@ nfs_wait_on_inode(struct inode *inode, int flag)
...
@@ -870,7 +858,7 @@ nfs_wait_on_inode(struct inode *inode, int flag)
int
error
;
int
error
;
if
(
!
(
NFS_FLAGS
(
inode
)
&
flag
))
if
(
!
(
NFS_FLAGS
(
inode
)
&
flag
))
return
0
;
return
0
;
inode
->
i_count
++
;
atomic_inc
(
&
inode
->
i_count
)
;
error
=
nfs_wait_event
(
clnt
,
inode
->
i_wait
,
!
(
NFS_FLAGS
(
inode
)
&
flag
));
error
=
nfs_wait_event
(
clnt
,
inode
->
i_wait
,
!
(
NFS_FLAGS
(
inode
)
&
flag
));
iput
(
inode
);
iput
(
inode
);
return
error
;
return
error
;
...
@@ -1019,8 +1007,8 @@ nfs_refresh_inode(struct inode *inode, struct nfs_fattr *fattr)
...
@@ -1019,8 +1007,8 @@ nfs_refresh_inode(struct inode *inode, struct nfs_fattr *fattr)
goto
out
;
goto
out
;
dfprintk
(
VFS
,
"NFS: refresh_inode(%x/%ld ct=%d info=0x%x)
\n
"
,
dfprintk
(
VFS
,
"NFS: refresh_inode(%x/%ld ct=%d info=0x%x)
\n
"
,
inode
->
i_dev
,
inode
->
i_ino
,
inode
->
i_count
,
inode
->
i_dev
,
inode
->
i_ino
,
fattr
->
valid
);
atomic_read
(
&
inode
->
i_count
),
fattr
->
valid
);
if
(
NFS_FSID
(
inode
)
!=
fattr
->
fsid
||
if
(
NFS_FSID
(
inode
)
!=
fattr
->
fsid
||
...
...
fs/nfsd/nfsfh.c
View file @
eea87ac9
...
@@ -142,7 +142,7 @@ static struct dentry *nfsd_iget(struct super_block *sb, unsigned long ino, __u32
...
@@ -142,7 +142,7 @@ static struct dentry *nfsd_iget(struct super_block *sb, unsigned long ino, __u32
/* we didn't find the right inode.. */
/* we didn't find the right inode.. */
dprintk
(
"fh_verify: Inode %lu, Bad count: %d %d or version %u %u
\n
"
,
dprintk
(
"fh_verify: Inode %lu, Bad count: %d %d or version %u %u
\n
"
,
inode
->
i_ino
,
inode
->
i_ino
,
inode
->
i_nlink
,
inode
->
i_count
,
inode
->
i_nlink
,
atomic_read
(
&
inode
->
i_count
)
,
inode
->
i_generation
,
inode
->
i_generation
,
generation
);
generation
);
...
...
fs/nfsd/vfs.c
View file @
eea87ac9
...
@@ -492,16 +492,10 @@ nfsd_close(struct file *filp)
...
@@ -492,16 +492,10 @@ nfsd_close(struct file *filp)
struct
dentry
*
dentry
=
filp
->
f_dentry
;
struct
dentry
*
dentry
=
filp
->
f_dentry
;
struct
inode
*
inode
=
dentry
->
d_inode
;
struct
inode
*
inode
=
dentry
->
d_inode
;
if
(
!
inode
->
i_count
)
printk
(
KERN_WARNING
"nfsd: inode count == 0!
\n
"
);
if
(
!
dentry
->
d_count
)
printk
(
KERN_WARNING
"nfsd: wheee, %s/%s d_count == 0!
\n
"
,
dentry
->
d_parent
->
d_name
.
name
,
dentry
->
d_name
.
name
);
if
(
filp
->
f_op
&&
filp
->
f_op
->
release
)
if
(
filp
->
f_op
&&
filp
->
f_op
->
release
)
filp
->
f_op
->
release
(
inode
,
filp
);
filp
->
f_op
->
release
(
inode
,
filp
);
if
(
filp
->
f_mode
&
FMODE_WRITE
)
{
if
(
filp
->
f_mode
&
FMODE_WRITE
)
put_write_access
(
inode
);
put_write_access
(
inode
);
}
}
}
/*
/*
...
...
fs/ntfs/fs.c
View file @
eea87ac9
...
@@ -218,7 +218,7 @@ static int ntfs_readdir(struct file* filp, void *dirent, filldir_t filldir)
...
@@ -218,7 +218,7 @@ static int ntfs_readdir(struct file* filp, void *dirent, filldir_t filldir)
(
unsigned
)
dir
->
i_ino
,(
unsigned
int
)
dir
->
i_mode
);
(
unsigned
)
dir
->
i_ino
,(
unsigned
int
)
dir
->
i_mode
);
ntfs_debug
(
DEBUG_OTHER
,
"readdir: Looking for file %x dircount %d
\n
"
,
ntfs_debug
(
DEBUG_OTHER
,
"readdir: Looking for file %x dircount %d
\n
"
,
(
unsigned
)
filp
->
f_pos
,
dir
->
i_count
);
(
unsigned
)
filp
->
f_pos
,
atomic_read
(
&
dir
->
i_count
)
);
cb
.
pl
=
filp
->
f_pos
&
0xFFFF
;
cb
.
pl
=
filp
->
f_pos
&
0xFFFF
;
cb
.
ph
=
filp
->
f_pos
>>
16
;
cb
.
ph
=
filp
->
f_pos
>>
16
;
/* end of directory */
/* end of directory */
...
...
fs/proc/inode.c
View file @
eea87ac9
...
@@ -52,16 +52,6 @@ void de_put(struct proc_dir_entry *de)
...
@@ -52,16 +52,6 @@ void de_put(struct proc_dir_entry *de)
}
}
}
}
static
void
proc_put_inode
(
struct
inode
*
inode
)
{
/*
* Kill off unused inodes ... VFS will unhash and
* delete the inode if we set i_nlink to zero.
*/
if
(
inode
->
i_count
==
1
)
inode
->
i_nlink
=
0
;
}
/*
/*
* Decrement the use count of the proc_dir_entry.
* Decrement the use count of the proc_dir_entry.
*/
*/
...
@@ -102,7 +92,7 @@ static int proc_statfs(struct super_block *sb, struct statfs *buf)
...
@@ -102,7 +92,7 @@ static int proc_statfs(struct super_block *sb, struct statfs *buf)
static
struct
super_operations
proc_sops
=
{
static
struct
super_operations
proc_sops
=
{
read_inode:
proc_read_inode
,
read_inode:
proc_read_inode
,
put_inode:
proc_put_inod
e
,
put_inode:
force_delet
e
,
delete_inode:
proc_delete_inode
,
delete_inode:
proc_delete_inode
,
statfs:
proc_statfs
,
statfs:
proc_statfs
,
};
};
...
...
fs/qnx4/bitmap.c
View file @
eea87ac9
...
@@ -153,25 +153,6 @@ static void qnx4_clear_inode(struct inode *inode)
...
@@ -153,25 +153,6 @@ static void qnx4_clear_inode(struct inode *inode)
void
qnx4_free_inode
(
struct
inode
*
inode
)
void
qnx4_free_inode
(
struct
inode
*
inode
)
{
{
if
(
!
inode
)
{
return
;
}
if
(
!
inode
->
i_dev
)
{
printk
(
"free_inode: inode has no device
\n
"
);
return
;
}
if
(
inode
->
i_count
>
1
)
{
printk
(
"free_inode: inode has count=%d
\n
"
,
inode
->
i_count
);
return
;
}
if
(
inode
->
i_nlink
)
{
printk
(
"free_inode: inode has nlink=%d
\n
"
,
inode
->
i_nlink
);
return
;
}
if
(
!
inode
->
i_sb
)
{
printk
(
"free_inode: inode on nonexistent device
\n
"
);
return
;
}
if
(
inode
->
i_ino
<
1
)
{
if
(
inode
->
i_ino
<
1
)
{
printk
(
"free_inode: inode 0 or nonexistent inode
\n
"
);
printk
(
"free_inode: inode 0 or nonexistent inode
\n
"
);
return
;
return
;
...
...
fs/ramfs/inode.c
View file @
eea87ac9
...
@@ -181,7 +181,7 @@ static int ramfs_link(struct dentry *old_dentry, struct inode * dir, struct dent
...
@@ -181,7 +181,7 @@ static int ramfs_link(struct dentry *old_dentry, struct inode * dir, struct dent
return
-
EPERM
;
return
-
EPERM
;
inode
->
i_nlink
++
;
inode
->
i_nlink
++
;
inode
->
i_count
++
;
/* New dentry reference */
atomic_inc
(
&
inode
->
i_count
)
;
/* New dentry reference */
dget
(
dentry
);
/* Extra pinning count for the created dentry */
dget
(
dentry
);
/* Extra pinning count for the created dentry */
d_instantiate
(
dentry
,
inode
);
d_instantiate
(
dentry
,
inode
);
return
0
;
return
0
;
...
...
fs/smbfs/inode.c
View file @
eea87ac9
...
@@ -29,7 +29,6 @@
...
@@ -29,7 +29,6 @@
#define SMBFS_PARANOIA 1
#define SMBFS_PARANOIA 1
/* #define SMBFS_DEBUG_VERBOSE 1 */
/* #define SMBFS_DEBUG_VERBOSE 1 */
static
void
smb_put_inode
(
struct
inode
*
);
static
void
smb_delete_inode
(
struct
inode
*
);
static
void
smb_delete_inode
(
struct
inode
*
);
static
void
smb_put_super
(
struct
super_block
*
);
static
void
smb_put_super
(
struct
super_block
*
);
static
int
smb_statfs
(
struct
super_block
*
,
struct
statfs
*
);
static
int
smb_statfs
(
struct
super_block
*
,
struct
statfs
*
);
...
@@ -37,7 +36,7 @@ static void smb_set_inode_attr(struct inode *, struct smb_fattr *);
...
@@ -37,7 +36,7 @@ static void smb_set_inode_attr(struct inode *, struct smb_fattr *);
static
struct
super_operations
smb_sops
=
static
struct
super_operations
smb_sops
=
{
{
put_inode:
smb_put_inod
e
,
put_inode:
force_delet
e
,
delete_inode:
smb_delete_inode
,
delete_inode:
smb_delete_inode
,
put_super:
smb_put_super
,
put_super:
smb_put_super
,
statfs:
smb_statfs
,
statfs:
smb_statfs
,
...
@@ -271,18 +270,6 @@ dentry->d_parent->d_name.name, dentry->d_name.name,
...
@@ -271,18 +270,6 @@ dentry->d_parent->d_name.name, dentry->d_name.name,
return
error
;
return
error
;
}
}
/*
* This routine is called for every iput(). We clear i_nlink
* on the last use to force a call to delete_inode.
*/
static
void
smb_put_inode
(
struct
inode
*
ino
)
{
pr_debug
(
"smb_put_inode: count = %d
\n
"
,
ino
->
i_count
);
if
(
ino
->
i_count
==
1
)
ino
->
i_nlink
=
0
;
}
/*
/*
* This routine is called when i_nlink == 0 and i_count goes to 0.
* This routine is called when i_nlink == 0 and i_count goes to 0.
* All blocking cleanup operations need to go here to avoid races.
* All blocking cleanup operations need to go here to avoid races.
...
...
fs/sysv/ialloc.c
View file @
eea87ac9
...
@@ -56,24 +56,7 @@ void sysv_free_inode(struct inode * inode)
...
@@ -56,24 +56,7 @@ void sysv_free_inode(struct inode * inode)
struct
buffer_head
*
bh
;
struct
buffer_head
*
bh
;
struct
sysv_inode
*
raw_inode
;
struct
sysv_inode
*
raw_inode
;
if
(
!
inode
)
sb
=
inode
->
i_sb
;
return
;
if
(
!
inode
->
i_dev
)
{
printk
(
"sysv_free_inode: inode has no device
\n
"
);
return
;
}
if
(
inode
->
i_count
!=
1
)
{
printk
(
"sysv_free_inode: inode has count=%d
\n
"
,
inode
->
i_count
);
return
;
}
if
(
inode
->
i_nlink
)
{
printk
(
"sysv_free_inode: inode has nlink=%d
\n
"
,
inode
->
i_nlink
);
return
;
}
if
(
!
(
sb
=
inode
->
i_sb
))
{
printk
(
"sysv_free_inode: inode on nonexistent device
\n
"
);
return
;
}
ino
=
inode
->
i_ino
;
ino
=
inode
->
i_ino
;
if
(
ino
<=
SYSV_ROOT_INO
||
ino
>
sb
->
sv_ninodes
)
{
if
(
ino
<=
SYSV_ROOT_INO
||
ino
>
sb
->
sv_ninodes
)
{
printk
(
"sysv_free_inode: inode 0,1,2 or nonexistent inode
\n
"
);
printk
(
"sysv_free_inode: inode 0,1,2 or nonexistent inode
\n
"
);
...
@@ -112,7 +95,6 @@ struct inode * sysv_new_inode(const struct inode * dir)
...
@@ -112,7 +95,6 @@ struct inode * sysv_new_inode(const struct inode * dir)
return
NULL
;
return
NULL
;
sb
=
dir
->
i_sb
;
sb
=
dir
->
i_sb
;
inode
->
i_sb
=
sb
;
inode
->
i_sb
=
sb
;
inode
->
i_flags
=
0
;
lock_super
(
sb
);
/* protect against task switches */
lock_super
(
sb
);
/* protect against task switches */
if
((
*
sb
->
sv_sb_fic_count
==
0
)
if
((
*
sb
->
sv_sb_fic_count
==
0
)
||
(
*
sv_sb_fic_inode
(
sb
,(
*
sb
->
sv_sb_fic_count
)
-
1
)
==
0
)
/* Applies only to SystemV2 FS */
||
(
*
sv_sb_fic_inode
(
sb
,(
*
sb
->
sv_sb_fic_count
)
-
1
)
==
0
)
/* Applies only to SystemV2 FS */
...
@@ -149,8 +131,6 @@ struct inode * sysv_new_inode(const struct inode * dir)
...
@@ -149,8 +131,6 @@ struct inode * sysv_new_inode(const struct inode * dir)
mark_buffer_dirty
(
sb
->
sv_bh1
,
1
);
/* super-block has been modified */
mark_buffer_dirty
(
sb
->
sv_bh1
,
1
);
/* super-block has been modified */
if
(
sb
->
sv_bh1
!=
sb
->
sv_bh2
)
mark_buffer_dirty
(
sb
->
sv_bh2
,
1
);
if
(
sb
->
sv_bh1
!=
sb
->
sv_bh2
)
mark_buffer_dirty
(
sb
->
sv_bh2
,
1
);
sb
->
s_dirt
=
1
;
/* and needs time stamp */
sb
->
s_dirt
=
1
;
/* and needs time stamp */
inode
->
i_count
=
1
;
inode
->
i_nlink
=
1
;
inode
->
i_dev
=
sb
->
s_dev
;
inode
->
i_dev
=
sb
->
s_dev
;
inode
->
i_uid
=
current
->
fsuid
;
inode
->
i_uid
=
current
->
fsuid
;
inode
->
i_gid
=
(
dir
->
i_mode
&
S_ISGID
)
?
dir
->
i_gid
:
current
->
fsgid
;
inode
->
i_gid
=
(
dir
->
i_mode
&
S_ISGID
)
?
dir
->
i_gid
:
current
->
fsgid
;
...
...
fs/sysv/inode.c
View file @
eea87ac9
...
@@ -43,7 +43,8 @@ void sysv_print_inode(struct inode * inode)
...
@@ -43,7 +43,8 @@ void sysv_print_inode(struct inode * inode)
printk("ino %lu mode 0%6.6o lk %d uid %d gid %d"
printk("ino %lu mode 0%6.6o lk %d uid %d gid %d"
" sz %lu blks %lu cnt %u\n",
" sz %lu blks %lu cnt %u\n",
inode->i_ino, inode->i_mode, inode->i_nlink, inode->i_uid,
inode->i_ino, inode->i_mode, inode->i_nlink, inode->i_uid,
inode->i_gid, inode->i_size, inode->i_blocks, inode->i_count);
inode->i_gid, inode->i_size, inode->i_blocks,
atomic_read(&inode->i_count));
printk(" db <0x%lx 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx"
printk(" db <0x%lx 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx"
" 0x%lx 0x%lx>\n",
" 0x%lx 0x%lx>\n",
inode->u.sysv_i.i_data[0], inode->u.sysv_i.i_data[1],
inode->u.sysv_i.i_data[0], inode->u.sysv_i.i_data[1],
...
...
fs/sysv/namei.c
View file @
eea87ac9
...
@@ -507,7 +507,7 @@ static int sysv_link(struct dentry * old_dentry, struct inode * dir,
...
@@ -507,7 +507,7 @@ static int sysv_link(struct dentry * old_dentry, struct inode * dir,
oldinode
->
i_nlink
++
;
oldinode
->
i_nlink
++
;
oldinode
->
i_ctime
=
CURRENT_TIME
;
oldinode
->
i_ctime
=
CURRENT_TIME
;
mark_inode_dirty
(
oldinode
);
mark_inode_dirty
(
oldinode
);
oldinode
->
i_count
++
;
atomic_inc
(
&
oldinode
->
i_count
)
;
d_instantiate
(
dentry
,
oldinode
);
d_instantiate
(
dentry
,
oldinode
);
return
0
;
return
0
;
}
}
...
...
fs/udf/ialloc.c
View file @
eea87ac9
...
@@ -38,27 +38,6 @@ void udf_free_inode(struct inode * inode)
...
@@ -38,27 +38,6 @@ void udf_free_inode(struct inode * inode)
int
is_directory
;
int
is_directory
;
unsigned
long
ino
;
unsigned
long
ino
;
if
(
!
inode
->
i_dev
)
{
udf_debug
(
"inode has no device
\n
"
);
return
;
}
if
(
inode
->
i_count
>
1
)
{
udf_debug
(
"inode has count=%d
\n
"
,
inode
->
i_count
);
return
;
}
if
(
inode
->
i_nlink
)
{
udf_debug
(
"inode has nlink=%d
\n
"
,
inode
->
i_nlink
);
return
;
}
if
(
!
sb
)
{
udf_debug
(
"inode on nonexistent device
\n
"
);
return
;
}
ino
=
inode
->
i_ino
;
ino
=
inode
->
i_ino
;
/*
/*
...
...
fs/udf/namei.c
View file @
eea87ac9
...
@@ -1108,7 +1108,7 @@ static int udf_link(struct dentry * old_dentry, struct inode * dir,
...
@@ -1108,7 +1108,7 @@ static int udf_link(struct dentry * old_dentry, struct inode * dir,
inode
->
i_ctime
=
CURRENT_TIME
;
inode
->
i_ctime
=
CURRENT_TIME
;
UDF_I_UCTIME
(
inode
)
=
CURRENT_UTIME
;
UDF_I_UCTIME
(
inode
)
=
CURRENT_UTIME
;
mark_inode_dirty
(
inode
);
mark_inode_dirty
(
inode
);
inode
->
i_count
++
;
atomic_inc
(
&
inode
->
i_count
)
;
d_instantiate
(
dentry
,
inode
);
d_instantiate
(
dentry
,
inode
);
return
0
;
return
0
;
}
}
...
...
fs/ufs/ialloc.c
View file @
eea87ac9
...
@@ -70,22 +70,11 @@ void ufs_free_inode (struct inode * inode)
...
@@ -70,22 +70,11 @@ void ufs_free_inode (struct inode * inode)
UFSD
((
"ENTER, ino %lu
\n
"
,
inode
->
i_ino
))
UFSD
((
"ENTER, ino %lu
\n
"
,
inode
->
i_ino
))
if
(
!
inode
)
return
;
sb
=
inode
->
i_sb
;
sb
=
inode
->
i_sb
;
swab
=
sb
->
u
.
ufs_sb
.
s_swab
;
swab
=
sb
->
u
.
ufs_sb
.
s_swab
;
uspi
=
sb
->
u
.
ufs_sb
.
s_uspi
;
uspi
=
sb
->
u
.
ufs_sb
.
s_uspi
;
usb1
=
ubh_get_usb_first
(
USPI_UBH
);
usb1
=
ubh_get_usb_first
(
USPI_UBH
);
if
(
inode
->
i_count
>
1
)
{
ufs_warning
(
sb
,
"ufs_free_inode"
,
"inode has count=%d
\n
"
,
inode
->
i_count
);
return
;
}
if
(
inode
->
i_nlink
)
{
ufs_warning
(
sb
,
"ufs_free_inode"
,
"inode has nlink=%d
\n
"
,
inode
->
i_nlink
);
return
;
}
ino
=
inode
->
i_ino
;
ino
=
inode
->
i_ino
;
lock_super
(
sb
);
lock_super
(
sb
);
...
...
fs/ufs/namei.c
View file @
eea87ac9
...
@@ -834,7 +834,7 @@ static int ufs_link (struct dentry * old_dentry, struct inode * dir,
...
@@ -834,7 +834,7 @@ static int ufs_link (struct dentry * old_dentry, struct inode * dir,
inode
->
i_nlink
++
;
inode
->
i_nlink
++
;
inode
->
i_ctime
=
CURRENT_TIME
;
inode
->
i_ctime
=
CURRENT_TIME
;
mark_inode_dirty
(
inode
);
mark_inode_dirty
(
inode
);
inode
->
i_count
++
;
atomic_inc
(
&
inode
->
i_count
)
;
d_instantiate
(
dentry
,
inode
);
d_instantiate
(
dentry
,
inode
);
return
0
;
return
0
;
}
}
...
...
fs/umsdos/dir.c
View file @
eea87ac9
...
@@ -537,7 +537,7 @@ printk("umsdos_lookup_x: skipping DOS/linux\n");
...
@@ -537,7 +537,7 @@ printk("umsdos_lookup_x: skipping DOS/linux\n");
* We've found it OK. Now hash the dentry with the inode.
* We've found it OK. Now hash the dentry with the inode.
*/
*/
out_add:
out_add:
inode
->
i_count
++
;
atomic_inc
(
&
inode
->
i_count
)
;
d_add
(
dentry
,
inode
);
d_add
(
dentry
,
inode
);
dentry
->
d_op
=
&
umsdos_dentry_operations
;
dentry
->
d_op
=
&
umsdos_dentry_operations
;
ret
=
0
;
ret
=
0
;
...
...
fs/umsdos/inode.c
View file @
eea87ac9
...
@@ -51,14 +51,14 @@ void UMSDOS_put_inode (struct inode *inode)
...
@@ -51,14 +51,14 @@ void UMSDOS_put_inode (struct inode *inode)
"put inode %p (%lu) pos %lu count=%d
\n
"
"put inode %p (%lu) pos %lu count=%d
\n
"
,
inode
,
inode
->
i_ino
,
inode
,
inode
->
i_ino
,
inode
->
u
.
umsdos_i
.
pos
,
inode
->
u
.
umsdos_i
.
pos
,
inode
->
i_count
));
,
atomic_read
(
&
inode
->
i_count
)
));
if
(
inode
==
pseudo_root
)
{
if
(
inode
==
pseudo_root
)
{
printk
(
KERN_ERR
"Umsdos: Oops releasing pseudo_root."
printk
(
KERN_ERR
"Umsdos: Oops releasing pseudo_root."
" Notify jacques@solucorp.qc.ca
\n
"
);
" Notify jacques@solucorp.qc.ca
\n
"
);
}
}
if
(
inode
->
i_count
==
1
)
if
(
atomic_read
(
&
inode
->
i_count
)
==
1
)
inode
->
u
.
umsdos_i
.
i_patched
=
0
;
inode
->
u
.
umsdos_i
.
i_patched
=
0
;
}
}
...
...
fs/umsdos/namei.c
View file @
eea87ac9
...
@@ -279,14 +279,14 @@ static int umsdos_create_any (struct inode *dir, struct dentry *dentry,
...
@@ -279,14 +279,14 @@ static int umsdos_create_any (struct inode *dir, struct dentry *dentry,
goto
out_remove_dput
;
goto
out_remove_dput
;
inode
=
fake
->
d_inode
;
inode
=
fake
->
d_inode
;
inode
->
i_count
++
;
atomic_inc
(
&
inode
->
i_count
)
;
d_instantiate
(
dentry
,
inode
);
d_instantiate
(
dentry
,
inode
);
dput
(
fake
);
dput
(
fake
);
if
(
inode
->
i_count
>
1
)
{
if
(
atomic_read
(
&
inode
->
i_count
)
>
1
)
{
printk
(
KERN_WARNING
printk
(
KERN_WARNING
"umsdos_create_any: %s/%s, ino=%ld, icount=%d??
\n
"
,
"umsdos_create_any: %s/%s, ino=%ld, icount=%d??
\n
"
,
dentry
->
d_parent
->
d_name
.
name
,
dentry
->
d_name
.
name
,
dentry
->
d_parent
->
d_name
.
name
,
dentry
->
d_name
.
name
,
inode
->
i_ino
,
inode
->
i_count
);
inode
->
i_ino
,
atomic_read
(
&
inode
->
i_count
)
);
}
}
umsdos_lookup_patch_new
(
dentry
,
&
info
);
umsdos_lookup_patch_new
(
dentry
,
&
info
);
...
@@ -809,7 +809,7 @@ dentry->d_parent->d_name.name, info.fake.fname);
...
@@ -809,7 +809,7 @@ dentry->d_parent->d_name.name, info.fake.fname);
inode
=
temp
->
d_inode
;
inode
=
temp
->
d_inode
;
down
(
&
inode
->
i_sem
);
down
(
&
inode
->
i_sem
);
inode
->
i_count
++
;
atomic_inc
(
&
inode
->
i_count
)
;
d_instantiate
(
dentry
,
inode
);
d_instantiate
(
dentry
,
inode
);
/* N.B. this should have an option to create the EMD ... */
/* N.B. this should have an option to create the EMD ... */
...
...
include/linux/fs.h
View file @
eea87ac9
...
@@ -376,7 +376,7 @@ struct inode {
...
@@ -376,7 +376,7 @@ struct inode {
struct
list_head
i_dentry
;
struct
list_head
i_dentry
;
unsigned
long
i_ino
;
unsigned
long
i_ino
;
unsigned
in
t
i_count
;
atomic_
t
i_count
;
kdev_t
i_dev
;
kdev_t
i_dev
;
umode_t
i_mode
;
umode_t
i_mode
;
nlink_t
i_nlink
;
nlink_t
i_nlink
;
...
@@ -1071,6 +1071,7 @@ extern struct dentry * lookup_hash(struct qstr *, struct dentry *);
...
@@ -1071,6 +1071,7 @@ extern struct dentry * lookup_hash(struct qstr *, struct dentry *);
#define user_path_walk_link(name,nd) __user_walk(name, LOOKUP_POSITIVE, nd)
#define user_path_walk_link(name,nd) __user_walk(name, LOOKUP_POSITIVE, nd)
extern
void
iput
(
struct
inode
*
);
extern
void
iput
(
struct
inode
*
);
extern
void
force_delete
(
struct
inode
*
);
extern
struct
inode
*
igrab
(
struct
inode
*
);
extern
struct
inode
*
igrab
(
struct
inode
*
);
extern
ino_t
iunique
(
struct
super_block
*
,
ino_t
);
extern
ino_t
iunique
(
struct
super_block
*
,
ino_t
);
...
...
include/linux/wrapper.h
View file @
eea87ac9
...
@@ -19,9 +19,6 @@
...
@@ -19,9 +19,6 @@
#define module_unregister_blkdev unregister_blkdev
#define module_unregister_blkdev unregister_blkdev
#define inode_get_rdev(i) i->i_rdev
#define inode_get_rdev(i) i->i_rdev
#define inode_get_count(i) i->i_count
#define inode_inc_count(i) i->i_count++
#define inode_dec_count(i) i->i_count--
#define file_get_flags(f) f->f_flags
#define file_get_flags(f) f->f_flags
...
...
kernel/ksyms.c
View file @
eea87ac9
...
@@ -136,6 +136,7 @@ EXPORT_SYMBOL(igrab);
...
@@ -136,6 +136,7 @@ EXPORT_SYMBOL(igrab);
EXPORT_SYMBOL
(
iunique
);
EXPORT_SYMBOL
(
iunique
);
EXPORT_SYMBOL
(
iget4
);
EXPORT_SYMBOL
(
iget4
);
EXPORT_SYMBOL
(
iput
);
EXPORT_SYMBOL
(
iput
);
EXPORT_SYMBOL
(
force_delete
);
EXPORT_SYMBOL
(
follow_up
);
EXPORT_SYMBOL
(
follow_up
);
EXPORT_SYMBOL
(
follow_down
);
EXPORT_SYMBOL
(
follow_down
);
EXPORT_SYMBOL
(
path_init
);
EXPORT_SYMBOL
(
path_init
);
...
...
mm/mmap.c
View file @
eea87ac9
...
@@ -320,6 +320,8 @@ unsigned long do_mmap_pgoff(struct file * file, unsigned long addr, unsigned lon
...
@@ -320,6 +320,8 @@ unsigned long do_mmap_pgoff(struct file * file, unsigned long addr, unsigned lon
goto
unmap_and_free_vma
;
goto
unmap_and_free_vma
;
}
else
if
(
flags
&
MAP_SHARED
)
{
}
else
if
(
flags
&
MAP_SHARED
)
{
error
=
map_zero_setup
(
vma
);
error
=
map_zero_setup
(
vma
);
if
(
error
)
goto
free_vma
;
}
}
/*
/*
...
...
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