Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kirill Smelkov
linux
Commits
5770cca7
Commit
5770cca7
authored
17 years ago
by
Linus Torvalds
Browse files
Options
Download
Email Patches
Plain Diff
Import 2.1.78pre1
parent
c7c53f5b
Changes
50
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
232 additions
and
107 deletions
+232
-107
Documentation/networking/depca.txt
Documentation/networking/depca.txt
+92
-0
Makefile
Makefile
+1
-1
fs/affs/inode.c
fs/affs/inode.c
+2
-1
fs/affs/symlink.c
fs/affs/symlink.c
+6
-4
fs/attr.c
fs/attr.c
+10
-7
fs/autofs/symlink.c
fs/autofs/symlink.c
+6
-5
fs/bad_inode.c
fs/bad_inode.c
+1
-1
fs/buffer.c
fs/buffer.c
+2
-1
fs/coda/file.c
fs/coda/file.c
+7
-6
fs/coda/super.c
fs/coda/super.c
+5
-3
fs/coda/symlink.c
fs/coda/symlink.c
+8
-6
fs/dcache.c
fs/dcache.c
+3
-0
fs/ext2/inode.c
fs/ext2/inode.c
+11
-9
fs/ext2/namei.c
fs/ext2/namei.c
+3
-1
fs/ext2/symlink.c
fs/ext2/symlink.c
+8
-5
fs/fat/inode.c
fs/fat/inode.c
+3
-2
fs/isofs/symlink.c
fs/isofs/symlink.c
+7
-7
fs/lockd/clntproc.c
fs/lockd/clntproc.c
+1
-1
fs/minix/symlink.c
fs/minix/symlink.c
+7
-5
fs/namei.c
fs/namei.c
+49
-42
No files found.
Documentation/networking/depca.txt
0 → 100644
View file @
5770cca7
DE10x
=====
Memory Addresses:
SW1 SW2 SW3 SW4
64K on on on on d0000 dbfff
off on on on c0000 cbfff
off off on on e0000 ebfff
32K on on off on d8000 dbfff
off on off on c8000 cbfff
off off off on e8000 ebfff
DBR ROM on on dc000 dffff
off on cc000 cffff
off off ec000 effff
Note that the 2K mode is set by SW3/SW4 on/off or off/off. Address
assignment is through the RBSA register.
I/O Address:
SW5
0x300 on
0x200 off
Remote Boot:
SW6
Disable on
Enable off
Remote Boot Timeout:
SW7
2.5min on
30s off
IRQ:
SW8 SW9 SW10 SW11 SW12
2 on off off off off
3 off on off off off
4 off off on off off
5 off off off on off
7 off off off off on
DE20x
=====
Memory Size:
SW3 SW4
64K on on
32K off on
2K on off
2K off off
Start Addresses:
SW1 SW2 SW3 SW4
64K on on on on c0000 cffff
on off on on d0000 dffff
off on on on e0000 effff
32K on on off off c8000 cffff
on off off off d8000 dffff
off on off off e8000 effff
Illegal off off - - - -
I/O Address:
SW5
0x300 on
0x200 off
Remote Boot:
SW6
Disable on
Enable off
Remote Boot Timeout:
SW7
2.5min on
30s off
IRQ:
SW8 SW9 SW10 SW11 SW12
5 on off off off off
9 off on off off off
10 off off on off off
11 off off off on off
15 off off off off on
This diff is collapsed.
Click to expand it.
Makefile
View file @
5770cca7
VERSION
=
2
PATCHLEVEL
=
1
SUBLEVEL
=
7
7
SUBLEVEL
=
7
8
ARCH
:=
$(
shell
uname
-m
|
sed
-e
s/i.86/i386/
-e
s/sun4u/sparc64/
)
...
...
This diff is collapsed.
Click to expand it.
fs/affs/inode.c
View file @
5770cca7
...
...
@@ -220,8 +220,9 @@ affs_write_inode(struct inode *inode)
}
int
affs_notify_change
(
struct
inode
*
inode
,
struct
iattr
*
attr
)
affs_notify_change
(
struct
dentry
*
dentry
,
struct
iattr
*
attr
)
{
struct
inode
*
inode
=
dentry
->
d_inode
;
int
error
;
pr_debug
(
"AFFS: notify_change(%lu,0x%x)
\n
"
,
inode
->
i_ino
,
attr
->
ia_valid
);
...
...
This diff is collapsed.
Click to expand it.
fs/affs/symlink.c
View file @
5770cca7
...
...
@@ -19,8 +19,8 @@
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
static
int
affs_readlink
(
struct
inode
*
,
char
*
,
int
);
static
struct
dentry
*
affs_follow_link
(
struct
inode
*
inode
,
struct
dentry
*
base
);
static
int
affs_readlink
(
struct
dentry
*
,
char
*
,
int
);
static
struct
dentry
*
affs_follow_link
(
struct
dentry
*
dentry
,
struct
dentry
*
base
);
struct
inode_operations
affs_symlink_inode_operations
=
{
NULL
,
/* no file-operations */
...
...
@@ -44,8 +44,9 @@ struct inode_operations affs_symlink_inode_operations = {
};
static
int
affs_readlink
(
struct
inode
*
inode
,
char
*
buffer
,
int
buflen
)
affs_readlink
(
struct
inode
*
dentry
,
char
*
buffer
,
int
buflen
)
{
struct
inode
*
inode
=
dentry
->
d_inode
;
struct
buffer_head
*
bh
;
struct
slink_front
*
lf
;
int
i
,
j
;
...
...
@@ -97,8 +98,9 @@ affs_readlink(struct inode *inode, char *buffer, int buflen)
}
static
struct
dentry
*
affs_follow_link
(
struct
inode
*
inode
,
struct
dentry
*
base
)
affs_follow_link
(
struct
dentry
*
dentry
,
struct
dentry
*
base
)
{
struct
inode
*
inode
=
dentry
->
d_inode
;
struct
buffer_head
*
bh
;
struct
slink_front
*
lf
;
char
*
buffer
;
...
...
This diff is collapsed.
Click to expand it.
fs/attr.c
View file @
5770cca7
...
...
@@ -81,8 +81,9 @@ void inode_setattr(struct inode * inode, struct iattr * attr)
mark_inode_dirty
(
inode
);
}
int
notify_change
(
struct
inode
*
inode
,
struct
iattr
*
attr
)
int
notify_change
(
struct
dentry
*
dentry
,
struct
iattr
*
attr
)
{
struct
inode
*
inode
=
dentry
->
d_inode
;
int
error
;
time_t
now
=
CURRENT_TIME
;
unsigned
int
ia_valid
=
attr
->
ia_valid
;
...
...
@@ -93,11 +94,13 @@ int notify_change(struct inode * inode, struct iattr * attr)
if
(
!
(
ia_valid
&
ATTR_MTIME_SET
))
attr
->
ia_mtime
=
now
;
if
(
inode
->
i_sb
&&
inode
->
i_sb
->
s_op
&&
inode
->
i_sb
->
s_op
->
notify_change
)
return
inode
->
i_sb
->
s_op
->
notify_change
(
inode
,
attr
);
error
=
inode_change_ok
(
inode
,
attr
);
if
(
!
error
)
inode_setattr
(
inode
,
attr
);
if
(
inode
->
i_sb
&&
inode
->
i_sb
->
s_op
&&
inode
->
i_sb
->
s_op
->
notify_change
)
error
=
inode
->
i_sb
->
s_op
->
notify_change
(
dentry
,
attr
);
else
{
error
=
inode_change_ok
(
inode
,
attr
);
if
(
!
error
)
inode_setattr
(
inode
,
attr
);
}
return
error
;
}
This diff is collapsed.
Click to expand it.
fs/autofs/symlink.c
View file @
5770cca7
...
...
@@ -14,23 +14,24 @@
#include <linux/sched.h>
#include "autofs_i.h"
static
int
autofs_readlink
(
struct
inode
*
inode
,
char
*
buffer
,
int
buflen
)
static
int
autofs_readlink
(
struct
dentry
*
dentry
,
char
*
buffer
,
int
buflen
)
{
struct
autofs_symlink
*
sl
;
int
len
;
sl
=
(
struct
autofs_symlink
*
)
inode
->
u
.
generic_ip
;
sl
=
(
struct
autofs_symlink
*
)
dentry
->
d_
inode
->
u
.
generic_ip
;
len
=
sl
->
len
;
if
(
len
>
buflen
)
len
=
buflen
;
copy_to_user
(
buffer
,
sl
->
data
,
len
);
copy_to_user
(
buffer
,
sl
->
data
,
len
);
return
len
;
}
static
struct
dentry
*
autofs_follow_link
(
struct
inode
*
inode
,
struct
dentry
*
base
)
static
struct
dentry
*
autofs_follow_link
(
struct
dentry
*
dentry
,
struct
dentry
*
base
)
{
struct
autofs_symlink
*
sl
;
sl
=
(
struct
autofs_symlink
*
)
inode
->
u
.
generic_ip
;
sl
=
(
struct
autofs_symlink
*
)
dentry
->
d_
inode
->
u
.
generic_ip
;
return
lookup_dentry
(
sl
->
data
,
base
,
1
);
}
...
...
This diff is collapsed.
Click to expand it.
fs/bad_inode.c
View file @
5770cca7
...
...
@@ -13,7 +13,7 @@
/*
* The follow_symlink operation must dput() the base.
*/
static
struct
dentry
*
bad_follow_link
(
struct
inode
*
ino
,
struct
dentry
*
base
)
static
struct
dentry
*
bad_follow_link
(
struct
dentry
*
dent
,
struct
dentry
*
base
)
{
dput
(
base
);
return
ERR_PTR
(
-
EIO
);
...
...
This diff is collapsed.
Click to expand it.
fs/buffer.c
View file @
5770cca7
...
...
@@ -1522,8 +1522,9 @@ void mark_buffer_uptodate(struct buffer_head * bh, int on)
* mark_buffer_uptodate() functions propagate buffer state into the
* page struct once IO has completed.
*/
int
generic_readpage
(
struct
inode
*
inode
,
struct
page
*
page
)
int
generic_readpage
(
struct
dentry
*
dentry
,
struct
page
*
page
)
{
struct
inode
*
inode
=
dentry
->
d_inode
;
unsigned
long
block
;
int
*
p
,
nr
[
PAGE_SIZE
/
512
];
int
i
;
...
...
This diff is collapsed.
Click to expand it.
fs/coda/file.c
View file @
5770cca7
...
...
@@ -25,10 +25,10 @@
#include <linux/coda_cache.h>
/* file operations */
static
int
coda_readpage
(
struct
inode
*
inode
,
struct
page
*
page
);
static
ssize_t
coda_file_read
(
struct
file
*
f
,
char
*
buf
,
size_t
count
,
loff_t
*
off
);
static
ssize_t
coda_file_write
(
struct
file
*
f
,
const
char
*
buf
,
size_t
count
,
loff_t
*
off
);
static
int
coda_file_mmap
(
struct
file
*
file
,
struct
vm_area_struct
*
vma
);
static
int
coda_readpage
(
struct
dentry
*
,
struct
page
*
);
static
ssize_t
coda_file_read
(
struct
file
*
,
char
*
,
size_t
,
loff_t
*
);
static
ssize_t
coda_file_write
(
struct
file
*
,
const
char
*
,
size_t
,
loff_t
*
);
static
int
coda_file_mmap
(
struct
file
*
,
struct
vm_area_struct
*
);
/* exported from this file */
int
coda_fsync
(
struct
file
*
,
struct
dentry
*
dentry
);
...
...
@@ -74,9 +74,9 @@ struct file_operations coda_file_operations = {
};
/* File file operations */
static
int
coda_readpage
(
struct
inode
*
inode
,
struct
page
*
page
)
static
int
coda_readpage
(
struct
dentry
*
dentry
,
struct
page
*
page
)
{
struct
inode
*
open_inode
;
struct
inode
*
open_inode
,
*
inode
=
dentry
->
d_inode
;
struct
cnode
*
cnp
;
ENTRY
;
...
...
@@ -93,6 +93,7 @@ static int coda_readpage(struct inode * inode, struct page * page)
CDEBUG
(
D_INODE
,
"coda ino: %ld, cached ino %ld, page offset: %lx
\n
"
,
inode
->
i_ino
,
open_inode
->
i_ino
,
page
->
offset
);
/* N.B. This needs the dentry for open_inode */
generic_readpage
(
open_inode
,
page
);
EXIT
;
return
0
;
...
...
This diff is collapsed.
Click to expand it.
fs/coda/super.c
View file @
5770cca7
...
...
@@ -41,7 +41,7 @@
/* VFS super_block ops */
static
struct
super_block
*
coda_read_super
(
struct
super_block
*
,
void
*
,
int
);
static
void
coda_read_inode
(
struct
inode
*
);
static
int
coda_notify_change
(
struct
inode
*
inode
,
struct
iattr
*
attr
);
static
int
coda_notify_change
(
struct
dentry
*
,
struct
iattr
*
);
static
void
coda_put_inode
(
struct
inode
*
);
static
void
coda_delete_inode
(
struct
inode
*
);
static
void
coda_put_super
(
struct
super_block
*
);
...
...
@@ -133,6 +133,7 @@ static struct super_block * coda_read_super(struct super_block *sb,
printk
(
"coda_read_super: rootinode is %ld dev %d
\n
"
,
root
->
i_ino
,
root
->
i_dev
);
sbi
->
sbi_root
=
root
;
/* N.B. check this for failure */
sb
->
s_root
=
d_alloc_root
(
root
,
NULL
);
unlock_super
(
sb
);
EXIT
;
...
...
@@ -140,7 +141,6 @@ static struct super_block * coda_read_super(struct super_block *sb,
error:
EXIT
;
MOD_DEC_USE_COUNT
;
if
(
sbi
)
{
sbi
->
sbi_vcomm
=
NULL
;
sbi
->
sbi_root
=
NULL
;
...
...
@@ -154,6 +154,7 @@ EXIT;
coda_cnode_free
(
ITOC
(
root
));
}
sb
->
s_dev
=
0
;
MOD_DEC_USE_COUNT
;
return
NULL
;
}
...
...
@@ -224,8 +225,9 @@ static void coda_delete_inode(struct inode *inode)
EXIT
;
}
static
int
coda_notify_change
(
struct
inode
*
inode
,
struct
iattr
*
iattr
)
static
int
coda_notify_change
(
struct
dentry
*
dentry
,
struct
iattr
*
iattr
)
{
struct
inode
*
inode
=
dentry
->
d_inode
;
struct
cnode
*
cnp
;
struct
coda_vattr
vattr
;
int
error
;
...
...
This diff is collapsed.
Click to expand it.
fs/coda/symlink.c
View file @
5770cca7
...
...
@@ -24,8 +24,8 @@
#include <linux/coda_cnode.h>
#include <linux/coda_cache.h>
static
int
coda_readlink
(
struct
inode
*
inode
,
char
*
buffer
,
int
length
);
static
struct
dentry
*
coda_follow_link
(
struct
inode
*
,
struct
dentry
*
);
static
int
coda_readlink
(
struct
dentry
*
dentry
,
char
*
buffer
,
int
length
);
static
struct
dentry
*
coda_follow_link
(
struct
dentry
*
,
struct
dentry
*
);
struct
inode_operations
coda_symlink_inode_operations
=
{
NULL
,
/* no file-operations */
...
...
@@ -50,8 +50,9 @@ struct inode_operations coda_symlink_inode_operations = {
NULL
/* revalidate */
};
static
int
coda_readlink
(
struct
inode
*
inode
,
char
*
buffer
,
int
length
)
static
int
coda_readlink
(
struct
inode
*
dentry
,
char
*
buffer
,
int
length
)
{
struct
inode
*
inode
=
dentry
->
d_inode
;
int
len
;
int
error
;
char
*
buf
;
...
...
@@ -83,14 +84,15 @@ static int coda_readlink(struct inode *inode, char *buffer, int length)
return
error
;
}
static
struct
dentry
*
coda_follow_link
(
struct
inode
*
inode
,
struct
dentry
*
base
)
static
struct
dentry
*
coda_follow_link
(
struct
dentry
*
dentry
,
struct
dentry
*
base
)
{
struct
inode
*
inode
=
dentry
->
d_inode
;
int
error
;
struct
cnode
*
cnp
;
unsigned
int
len
;
char
mem
[
CFS_MAXPATHLEN
];
char
*
path
;
char
mem
[
CFS_MAXPATHLEN
];
/* N.B. too big for the stack? */
ENTRY
;
CDEBUG
(
D_INODE
,
"(%x/%ld)
\n
"
,
inode
->
i_dev
,
inode
->
i_ino
);
...
...
This diff is collapsed.
Click to expand it.
fs/dcache.c
View file @
5770cca7
...
...
@@ -52,6 +52,8 @@ struct {
static
inline
void
d_free
(
struct
dentry
*
dentry
)
{
if
(
dentry
->
d_op
&&
dentry
->
d_op
->
d_release
)
dentry
->
d_op
->
d_release
(
dentry
);
kfree
(
dentry
->
d_name
.
name
);
kfree
(
dentry
);
}
...
...
@@ -502,6 +504,7 @@ printk("d_alloc: %d unused, pruning dcache\n", dentry_stat.nr_unused);
dentry
->
d_name
.
len
=
name
->
len
;
dentry
->
d_name
.
hash
=
name
->
hash
;
dentry
->
d_op
=
NULL
;
dentry
->
d_fsdata
=
NULL
;
return
dentry
;
}
...
...
This diff is collapsed.
Click to expand it.
fs/ext2/inode.c
View file @
5770cca7
...
...
@@ -631,23 +631,25 @@ int ext2_sync_inode (struct inode *inode)
return
ext2_update_inode
(
inode
,
1
);
}
int
ext2_notify_change
(
struct
inode
*
inode
,
struct
iattr
*
iattr
)
int
ext2_notify_change
(
struct
dentry
*
dentry
,
struct
iattr
*
iattr
)
{
struct
inode
*
inode
=
dentry
->
d_inode
;
int
retval
;
unsigned
int
flags
;
retval
=
-
EPERM
;
if
((
iattr
->
ia_attr_flags
&
(
ATTR_FLAG_APPEND
|
ATTR_FLAG_IMMUTABLE
))
^
(
inode
->
u
.
ext2_i
.
i_flags
&
(
EXT2_APPEND_FL
|
EXT2_IMMUTABLE_FL
)))
{
if
(
securelevel
>
0
||
!
fsuser
())
return
-
EPERM
;
}
else
if
((
current
->
fsuid
!=
inode
->
i_uid
)
&&
!
fsuser
())
return
-
EPERM
;
goto
out
;
}
else
if
((
current
->
fsuid
!=
inode
->
i_uid
)
&&
!
fsuser
())
goto
out
;
if
((
retval
=
inode_change_ok
(
inode
,
iattr
))
!=
0
)
return
retval
;
retval
=
inode_change_ok
(
inode
,
iattr
);
if
(
retval
!=
0
)
goto
out
;
inode_setattr
(
inode
,
iattr
);
...
...
@@ -681,7 +683,7 @@ int ext2_notify_change(struct inode *inode, struct iattr *iattr)
inode
->
u
.
ext2_i
.
i_flags
&=
~
EXT2_IMMUTABLE_FL
;
}
mark_inode_dirty
(
inode
);
return
0
;
out:
return
retval
;
}
This diff is collapsed.
Click to expand it.
fs/ext2/namei.c
View file @
5770cca7
...
...
@@ -793,8 +793,10 @@ int ext2_symlink (struct inode * dir, struct dentry *dentry, const char * symnam
goto
out
;
}
int
ext2_link
(
struct
inode
*
inode
,
struct
inode
*
dir
,
struct
dentry
*
dentry
)
int
ext2_link
(
struct
dentry
*
old_dentry
,
struct
inode
*
dir
,
struct
dentry
*
dentry
)
{
struct
inode
*
inode
=
old_dentry
->
d_inode
;
struct
ext2_dir_entry
*
de
;
struct
buffer_head
*
bh
;
int
err
;
...
...
This diff is collapsed.
Click to expand it.
fs/ext2/symlink.c
View file @
5770cca7
...
...
@@ -24,8 +24,8 @@
#include <linux/mm.h>
#include <linux/stat.h>
static
int
ext2_readlink
(
struct
inode
*
,
char
*
,
int
);
static
struct
dentry
*
ext2_follow_link
(
struct
inode
*
,
struct
dentry
*
);
static
int
ext2_readlink
(
struct
dentry
*
,
char
*
,
int
);
static
struct
dentry
*
ext2_follow_link
(
struct
dentry
*
,
struct
dentry
*
);
/*
* symlinks can't do much...
...
...
@@ -51,10 +51,12 @@ struct inode_operations ext2_symlink_inode_operations = {
NULL
/* smap */
};
static
struct
dentry
*
ext2_follow_link
(
struct
inode
*
inode
,
struct
dentry
*
base
)
static
struct
dentry
*
ext2_follow_link
(
struct
dentry
*
dentry
,
struct
dentry
*
base
)
{
int
error
;
struct
inode
*
inode
=
dentry
->
d_inode
;
struct
buffer_head
*
bh
=
NULL
;
int
error
;
char
*
link
;
link
=
(
char
*
)
inode
->
u
.
ext2_i
.
i_data
;
...
...
@@ -72,8 +74,9 @@ static struct dentry * ext2_follow_link(struct inode * inode, struct dentry *bas
return
base
;
}
static
int
ext2_readlink
(
struct
inode
*
inode
,
char
*
buffer
,
int
buflen
)
static
int
ext2_readlink
(
struct
dentry
*
dentry
,
char
*
buffer
,
int
buflen
)
{
struct
inode
*
inode
=
dentry
->
d_inode
;
struct
buffer_head
*
bh
=
NULL
;
char
*
link
;
int
i
;
...
...
This diff is collapsed.
Click to expand it.
fs/fat/inode.c
View file @
5770cca7
...
...
@@ -783,9 +783,10 @@ void fat_write_inode(struct inode *inode)
}
int
fat_notify_change
(
struct
inode
*
inode
,
struct
iattr
*
attr
)
int
fat_notify_change
(
struct
dentry
*
dentry
,
struct
iattr
*
attr
)
{
struct
super_block
*
sb
=
inode
->
i_sb
;
struct
super_block
*
sb
=
dentry
->
d_sb
;
struct
inode
*
inode
=
dentry
->
d_inode
;
int
error
;
error
=
inode_change_ok
(
inode
,
attr
);
...
...
This diff is collapsed.
Click to expand it.
fs/isofs/symlink.c
View file @
5770cca7
...
...
@@ -18,8 +18,8 @@
#include <asm/uaccess.h>
static
int
isofs_readlink
(
struct
inode
*
,
char
*
,
int
);
static
struct
dentry
*
isofs_follow_link
(
struct
inode
*
inode
,
struct
dentry
*
base
);
static
int
isofs_readlink
(
struct
dentry
*
,
char
*
,
int
);
static
struct
dentry
*
isofs_follow_link
(
struct
dentry
*
,
struct
dentry
*
);
/*
* symlinks can't do much...
...
...
@@ -44,14 +44,14 @@ struct inode_operations isofs_symlink_inode_operations = {
NULL
/* permission */
};
static
int
isofs_readlink
(
struct
inode
*
inode
,
char
*
buffer
,
int
buflen
)
static
int
isofs_readlink
(
struct
dentry
*
dentry
,
char
*
buffer
,
int
buflen
)
{
char
*
pnt
;
int
i
;
if
(
buflen
>
1023
)
buflen
=
1023
;
pnt
=
get_rock_ridge_symlink
(
inode
);
pnt
=
get_rock_ridge_symlink
(
dentry
->
d_
inode
);
if
(
!
pnt
)
return
0
;
...
...
@@ -65,12 +65,12 @@ static int isofs_readlink(struct inode * inode, char * buffer, int buflen)
return
i
;
}
static
struct
dentry
*
isofs_follow_link
(
struct
inode
*
inode
,
struct
dentry
*
base
)
static
struct
dentry
*
isofs_follow_link
(
struct
dentry
*
dentry
,
struct
dentry
*
base
)
{
char
*
pnt
;
pnt
=
get_rock_ridge_symlink
(
inode
);
pnt
=
get_rock_ridge_symlink
(
dentry
->
d_inode
);
if
(
!
pnt
)
{
dput
(
base
);
return
ERR_PTR
(
-
ELOOP
);
...
...
This diff is collapsed.
Click to expand it.
fs/lockd/clntproc.c
View file @
5770cca7
...
...
@@ -42,7 +42,7 @@ nlmclnt_setlockargs(struct nlm_rqst *req, struct file_lock *fl)
memset
(
argp
,
0
,
sizeof
(
*
argp
));
argp
->
cookie
=
nlm_cookie
++
;
argp
->
state
=
nsm_local_state
;
lock
->
fh
=
*
NFS_FH
(
fl
->
fl_file
->
f_dentry
->
d_inode
);
lock
->
fh
=
*
NFS_FH
(
fl
->
fl_file
->
f_dentry
);
lock
->
caller
=
system_utsname
.
nodename
;
lock
->
oh
.
data
=
req
->
a_owner
;
lock
->
oh
.
len
=
sprintf
(
req
->
a_owner
,
"%d@%s"
,
...
...
This diff is collapsed.
Click to expand it.
fs/minix/symlink.c
View file @
5770cca7
...
...
@@ -14,8 +14,8 @@
#include <asm/uaccess.h>
static
int
minix_readlink
(
struct
inode
*
,
char
*
,
int
);
static
struct
dentry
*
minix_follow_link
(
struct
inode
*
,
struct
dentry
*
);
static
int
minix_readlink
(
struct
dentry
*
,
char
*
,
int
);
static
struct
dentry
*
minix_follow_link
(
struct
dentry
*
,
struct
dentry
*
);
/*
* symlinks can't do much...
...
...
@@ -40,8 +40,10 @@ struct inode_operations minix_symlink_inode_operations = {
NULL
/* permission */
};
static
struct
dentry
*
minix_follow_link
(
struct
inode
*
inode
,
struct
dentry
*
base
)
static
struct
dentry
*
minix_follow_link
(
struct
dentry
*
dentry
,
struct
dentry
*
base
)
{
struct
inode
*
inode
=
dentry
->
d_inode
;
struct
buffer_head
*
bh
;
bh
=
minix_bread
(
inode
,
0
,
0
);
...
...
@@ -55,7 +57,7 @@ static struct dentry * minix_follow_link(struct inode * inode, struct dentry * b
return
base
;
}
static
int
minix_readlink
(
struct
inode
*
inode
,
char
*
buffer
,
int
buflen
)
static
int
minix_readlink
(
struct
dentry
*
dentry
,
char
*
buffer
,
int
buflen
)
{
struct
buffer_head
*
bh
;
int
i
;
...
...
@@ -63,7 +65,7 @@ static int minix_readlink(struct inode * inode, char * buffer, int buflen)
if
(
buflen
>
1023
)
buflen
=
1023
;
bh
=
minix_bread
(
inode
,
0
,
0
);
bh
=
minix_bread
(
dentry
->
d_
inode
,
0
,
0
);
if
(
!
bh
)
return
0
;
i
=
0
;
...
...
This diff is collapsed.
Click to expand it.
fs/namei.c
View file @
5770cca7
...
...
@@ -221,33 +221,28 @@ void put_write_access(struct inode * inode)
}
/*
* This is called when everything else fails, and we actually have
* to go to the low-level filesystem to find out what we should do..
*
* We get the directory semaphore, and after getting that we also
* make sure that nobody added the entry to the dcache in the meantime..
* "." and ".." are special - ".." especially so because it has to be able
* to know about the current root directory and parent relationships
*/
static
struct
dentry
*
re
al
_lookup
(
struct
dentry
*
parent
,
struct
qstr
*
name
)
static
struct
dentry
*
re
served
_lookup
(
struct
dentry
*
parent
,
struct
qstr
*
name
)
{
struct
dentry
*
result
;
struct
inode
*
dir
=
parent
->
d_inode
;
struct
dentry
*
result
=
NULL
;
if
(
name
->
name
[
0
]
==
'.'
)
{
switch
(
name
->
len
)
{
default:
break
;
case
2
:
if
(
name
->
name
[
1
]
!=
'.'
)
break
;
down
(
&
dir
->
i_sem
);
result
=
d_lookup
(
parent
,
name
);
if
(
!
result
)
{
struct
dentry
*
dentry
=
d_alloc
(
parent
,
name
);
result
=
ERR_PTR
(
-
ENOMEM
);
if
(
dentry
)
{
int
error
=
dir
->
i_op
->
lookup
(
dir
,
dentry
);
result
=
dentry
;
if
(
error
)
{
dput
(
dentry
);
result
=
ERR_PTR
(
error
);
}
if
(
parent
!=
current
->
fs
->
root
)
parent
=
parent
->
d_covers
->
d_parent
;
/* fallthrough */
case
1
:
result
=
parent
;
}
}
up
(
&
dir
->
i_sem
);
return
result
;
return
dget
(
result
);
}
/*
...
...
@@ -274,28 +269,40 @@ static struct dentry * cached_lookup(struct dentry * parent, struct qstr * name)
}
/*
* "." and ".." are special - ".." especially so because it has to be able
* to know about the current root directory and parent relationships
* This is called when everything else fails, and we actually have
* to go to the low-level filesystem to find out what we should do..
*
* We get the directory semaphore, and after getting that we also
* make sure that nobody added the entry to the dcache in the meantime..
*/
static
struct
dentry
*
re
served
_lookup
(
struct
dentry
*
parent
,
struct
qstr
*
name
)
static
struct
dentry
*
re
al
_lookup
(
struct
dentry
*
parent
,
struct
qstr
*
name
)
{
struct
dentry
*
result
=
NULL
;
if
(
name
->
name
[
0
]
==
'.'
)
{
switch
(
name
->
len
)
{
default:
break
;
case
2
:
if
(
name
->
name
[
1
]
!=
'.'
)
break
;
struct
dentry
*
result
;
struct
inode
*
dir
=
parent
->
d_inode
;
if
(
parent
!=
current
->
fs
->
root
)
parent
=
parent
->
d_covers
->
d_parent
;
/* fallthrough */
case
1
:
result
=
parent
;
down
(
&
dir
->
i_sem
);
/*
* First re-do the cached lookup just in case it was created
* while we waited for the directory semaphore..
*
* FIXME! This could use version numbering or similar to
* avoid unnecessary cache lookups.
*/
result
=
cached_lookup
(
parent
,
name
);
if
(
!
result
)
{
struct
dentry
*
dentry
=
d_alloc
(
parent
,
name
);
result
=
ERR_PTR
(
-
ENOMEM
);
if
(
dentry
)
{
int
error
=
dir
->
i_op
->
lookup
(
dir
,
dentry
);
result
=
dentry
;
if
(
error
)
{
dput
(
dentry
);
result
=
ERR_PTR
(
error
);
}
}
}
return
dget
(
result
);
up
(
&
dir
->
i_sem
);
return
result
;
}
static
struct
dentry
*
do_follow_link
(
struct
dentry
*
base
,
struct
dentry
*
dentry
)
...
...
@@ -308,7 +315,7 @@ static struct dentry * do_follow_link(struct dentry *base, struct dentry *dentry
current
->
link_count
++
;
/* This eats the base */
result
=
inode
->
i_op
->
follow_link
(
inode
,
base
);
result
=
inode
->
i_op
->
follow_link
(
dentry
,
base
);
current
->
link_count
--
;
dput
(
dentry
);
return
result
;
...
...
@@ -632,7 +639,7 @@ struct dentry * open_namei(const char * pathname, int flag, int mode)
if
(
inode
->
i_sb
&&
inode
->
i_sb
->
dq_op
)
inode
->
i_sb
->
dq_op
->
initialize
(
inode
,
-
1
);
error
=
do_truncate
(
inode
,
0
);
error
=
do_truncate
(
dentry
,
0
);
}
put_write_access
(
inode
);
if
(
error
)
...
...
@@ -1076,7 +1083,7 @@ static inline int do_link(const char * oldname, const char * newname)
if
(
dir
->
d_inode
->
i_sb
&&
dir
->
d_inode
->
i_sb
->
dq_op
)
dir
->
d_inode
->
i_sb
->
dq_op
->
initialize
(
dir
->
d_inode
,
-
1
);
error
=
dir
->
d_inode
->
i_op
->
link
(
inode
,
dir
->
d_inode
,
new_dentry
);
error
=
dir
->
d_inode
->
i_op
->
link
(
old_dentry
,
dir
->
d_inode
,
new_dentry
);
exit_lock:
unlock_dir
(
dir
);
...
...
This diff is collapsed.
Click to expand it.
Prev
1
2
3
Next
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