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
2fcc8e43
Commit
2fcc8e43
authored
Nov 23, 2007
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import 2.3.7pre2
parent
344971f8
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
161 additions
and
127 deletions
+161
-127
Documentation/Configure.help
Documentation/Configure.help
+0
-7
arch/i386/kernel/smp.c
arch/i386/kernel/smp.c
+32
-19
drivers/net/ibmtr.c
drivers/net/ibmtr.c
+4
-1
drivers/net/irda/irport.c
drivers/net/irda/irport.c
+1
-1
drivers/scsi/scsi_error.c
drivers/scsi/scsi_error.c
+9
-6
fs/Config.in
fs/Config.in
+0
-3
fs/buffer.c
fs/buffer.c
+12
-13
fs/smbfs/inode.c
fs/smbfs/inode.c
+0
-5
fs/smbfs/proc.c
fs/smbfs/proc.c
+75
-53
include/linux/mm.h
include/linux/mm.h
+2
-1
include/linux/pagemap.h
include/linux/pagemap.h
+1
-0
include/linux/smb.h
include/linux/smb.h
+1
-1
include/linux/smb_fs.h
include/linux/smb_fs.h
+16
-0
mm/filemap.c
mm/filemap.c
+4
-6
mm/page_io.c
mm/page_io.c
+0
-3
mm/swap_state.c
mm/swap_state.c
+3
-3
net/ipv4/udp.c
net/ipv4/udp.c
+1
-5
No files found.
Documentation/Configure.help
View file @
2fcc8e43
...
...
@@ -7723,13 +7723,6 @@ CONFIG_SMB_FS
want
),
say
M
here
and
read
Documentation
/
modules
.
txt
.
The
module
will
be
called
smbfs
.
o
.
Most
people
say
N
,
however
.
SMB
Win95
bug
work
-
around
CONFIG_SMB_WIN95
If
you
want
to
connect
to
a
share
exported
by
Windows
95
,
you
should
say
Y
here
.
The
Windows
95
server
contains
a
bug
that
makes
listing
directories
unreliable
.
This
option
slows
down
the
listing
of
directories
.
This
makes
the
Windows
95
server
a
bit
more
stable
.
Coda
filesystem
support
CONFIG_CODA_FS
Coda
is
an
advanced
network
filesystem
,
similar
to
NFS
in
that
it
...
...
arch/i386/kernel/smp.c
View file @
2fcc8e43
...
...
@@ -1164,6 +1164,7 @@ static void smp_tune_scheduling (void)
}
unsigned
int
prof_multiplier
[
NR_CPUS
];
unsigned
int
prof_old_multiplier
[
NR_CPUS
];
unsigned
int
prof_counter
[
NR_CPUS
];
/*
...
...
@@ -1187,6 +1188,7 @@ void __init smp_boot_cpus(void)
for
(
i
=
0
;
i
<
NR_CPUS
;
i
++
)
{
cpu_number_map
[
i
]
=
-
1
;
prof_counter
[
i
]
=
1
;
prof_old_multiplier
[
i
]
=
1
;
prof_multiplier
[
i
]
=
1
;
}
...
...
@@ -1733,6 +1735,10 @@ int smp_call_function (void (*func) (void *info), void *info, int retry,
return
0
;
}
static
unsigned
int
calibration_result
;
void
setup_APIC_timer
(
unsigned
int
clocks
);
/*
* Local timer interrupt handler. It does both profiling and
* process statistics/rescheduling.
...
...
@@ -1745,6 +1751,7 @@ int smp_call_function (void (*func) (void *info), void *info, int retry,
void
smp_local_timer_interrupt
(
struct
pt_regs
*
regs
)
{
int
user
=
(
user_mode
(
regs
)
!=
0
);
int
cpu
=
smp_processor_id
();
/*
...
...
@@ -1753,13 +1760,27 @@ void smp_local_timer_interrupt(struct pt_regs * regs)
* updated with atomic operations). This is especially
* useful with a profiling multiplier != 1
*/
if
(
!
user
_mode
(
regs
)
)
if
(
!
user
)
x86_do_profile
(
regs
->
eip
);
if
(
!--
prof_counter
[
cpu
])
{
int
user
=
0
,
system
=
0
;
int
system
=
1
-
user
;
struct
task_struct
*
p
=
current
;
/*
* The multiplier may have changed since the last time we got
* to this point as a result of the user writing to
* /proc/profile. In this case we need to adjust the APIC
* timer accordingly.
*
* Interrupts are already masked off at this point.
*/
prof_counter
[
cpu
]
=
prof_multiplier
[
cpu
];
if
(
prof_counter
[
cpu
]
!=
prof_old_multiplier
[
cpu
])
{
setup_APIC_timer
(
calibration_result
/
prof_counter
[
cpu
]);
prof_old_multiplier
[
cpu
]
=
prof_counter
[
cpu
];
}
/*
* After doing the above, we need to make like
* a normal interrupt - otherwise timer interrupts
...
...
@@ -1767,11 +1788,6 @@ void smp_local_timer_interrupt(struct pt_regs * regs)
* WrongThing (tm) to do.
*/
if
(
user_mode
(
regs
))
user
=
1
;
else
system
=
1
;
irq_enter
(
cpu
,
0
);
update_one_process
(
p
,
1
,
user
,
system
,
cpu
);
if
(
p
->
pid
)
{
...
...
@@ -1791,7 +1807,6 @@ void smp_local_timer_interrupt(struct pt_regs * regs)
kstat
.
per_cpu_system
[
cpu
]
+=
system
;
}
prof_counter
[
cpu
]
=
prof_multiplier
[
cpu
];
irq_exit
(
cpu
,
0
);
}
...
...
@@ -2064,8 +2079,6 @@ int __init calibrate_APIC_clock(void)
return
calibration_result
;
}
static
unsigned
int
calibration_result
;
void
__init
setup_APIC_clock
(
void
)
{
unsigned
long
flags
;
...
...
@@ -2117,13 +2130,10 @@ void __init setup_APIC_clock(void)
/*
* the frequency of the profiling timer can be changed
* by writing a multiplier value into /proc/profile.
*
* usually you want to run this on all CPUs ;)
*/
int
setup_profiling_timer
(
unsigned
int
multiplier
)
{
int
cpu
=
smp_processor_id
();
unsigned
long
flags
;
int
i
;
/*
* Sanity check. [at least 500 APIC cycles should be
...
...
@@ -2133,11 +2143,14 @@ int setup_profiling_timer(unsigned int multiplier)
if
(
(
!
multiplier
)
||
(
calibration_result
/
multiplier
<
500
))
return
-
EINVAL
;
save_flags
(
flags
);
cli
();
setup_APIC_timer
(
calibration_result
/
multiplier
);
prof_multiplier
[
cpu
]
=
multiplier
;
restore_flags
(
flags
);
/*
* Set the new multiplier for each CPU. CPUs don't start using the
* new values until the next timer interrupt in which they do process
* accounting. At that time they also adjust their APIC timers
* accordingly.
*/
for
(
i
=
0
;
i
<
NR_CPUS
;
++
i
)
prof_multiplier
[
i
]
=
multiplier
;
return
0
;
}
...
...
drivers/net/ibmtr.c
View file @
2fcc8e43
...
...
@@ -515,7 +515,7 @@ __initfunc(static int ibmtr_probe1(struct device *dev, int PIOaddr))
/* How much shared RAM is on adapter ? */
#ifdef PCMCIA
ti
->
avail_shared_ram
=
pcmcia_reality_check
(
get_sram_size
(
ti
));
ibmtr_mem_base
=
ti
->
sram_base
;
ibmtr_mem_base
=
ti
->
sram_base
<<
12
;
#else
ti
->
avail_shared_ram
=
get_sram_size
(
ti
);
#endif
...
...
@@ -835,6 +835,9 @@ static int tok_close(struct device *dev)
(
int
)
readb
(
ti
->
srb
+
offsetof
(
struct
srb_close_adapter
,
ret_code
)));
dev
->
start
=
0
;
#ifdef PCMCIA
ti
->
sram
=
0
;
#endif
DPRINTK
(
"Adapter closed.
\n
"
);
MOD_DEC_USE_COUNT
;
...
...
drivers/net/irda/irport.c
View file @
2fcc8e43
...
...
@@ -321,7 +321,7 @@ void irport_change_speed(struct irda_device *idev, int speed)
/* Turn on interrups */
outb
(
UART_IER_RLSI
|
UART_IER_RDI
|
UART_IER_THRI
,
iobase
+
UART_IER
);
spin_unlock_irqrestore
(
&
self
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
idev
->
lock
,
flags
);
}
/*
...
...
drivers/scsi/scsi_error.c
View file @
2fcc8e43
...
...
@@ -1926,6 +1926,7 @@ scsi_error_handler(void * data)
int
rtn
;
DECLARE_MUTEX_LOCKED
(
sem
);
unsigned
long
flags
;
struct
fs_struct
*
fs
;
lock_kernel
();
...
...
@@ -1936,16 +1937,18 @@ scsi_error_handler(void * data)
*/
exit_mm
(
current
);
current
->
session
=
1
;
current
->
pgrp
=
1
;
/*
* FIXME(eric) this is still a child process of the one that did the insmod.
* This needs to be attached to task[0] instead.
*/
/* Become as one with the init task */
exit_fs
(
current
);
/* current->fs->count--; */
fs
=
init_task
.
fs
;
current
->
fs
=
fs
;
atomic_inc
(
&
fs
->
count
);
siginitsetinv
(
&
current
->
blocked
,
SHUTDOWN_SIGS
);
current
->
fs
->
umask
=
0
;
/*
* Set the name of this process.
...
...
fs/Config.in
View file @
2fcc8e43
...
...
@@ -90,9 +90,6 @@ if [ "$CONFIG_INET" = "y" ]; then
fi
fi
tristate 'SMB filesystem support (to mount WfW shares etc.)' CONFIG_SMB_FS
if [ "$CONFIG_SMB_FS" != "n" ]; then
bool 'SMB Win95 bug work-around' CONFIG_SMB_WIN95
fi
fi
if [ "$CONFIG_IPX" != "n" -o "$CONFIG_INET" != "n" ]; then
tristate 'NCP filesystem support (to mount NetWare volumes)' CONFIG_NCP_FS
...
...
fs/buffer.c
View file @
2fcc8e43
...
...
@@ -1231,7 +1231,9 @@ static void end_buffer_io_async(struct buffer_head * bh, int uptodate)
*/
if
(
!
PageError
(
page
))
SetPageUptodate
(
page
);
page
->
owner
=
(
int
)
current
;
// HACK, FIXME, will go away.
if
(
page
->
owner
!=
-
1
)
PAGE_BUG
(
page
);
page
->
owner
=
(
int
)
current
;
UnlockPage
(
page
);
return
;
...
...
@@ -1276,17 +1278,6 @@ static int create_page_buffers (int rw, struct page *page, kdev_t dev, int b[],
unlock_kernel
();
memset
(
bh
->
b_data
,
0
,
size
);
lock_kernel
();
}
else
{
struct
buffer_head
*
alias
=
find_buffer
(
dev
,
block
,
size
);
/*
* Tricky issue. It is legal to have an alias here,
* because the buffer-cache layer can increase the
* b_counter even if the buffer goes inactive
* meanwhile.
*/
if
(
alias
)
{
printk
(
" buffer %p has nonzero alias %p which is locked!!! hoping that it will go away.
\n
"
,
bh
,
alias
);
}
}
}
tail
->
b_this_page
=
head
;
...
...
@@ -1532,7 +1523,7 @@ int brw_page(int rw, struct page *page, kdev_t dev, int b[], int size, int bmap)
int
nr
,
fresh
,
block
;
if
(
(
rw
==
READ
)
&&
!
PageLocked
(
page
))
if
(
!
PageLocked
(
page
))
panic
(
"brw_page: page not locked for I/O"
);
// clear_bit(PG_error, &page->flags);
/*
...
...
@@ -1546,6 +1537,7 @@ int brw_page(int rw, struct page *page, kdev_t dev, int b[], int size, int bmap)
}
if
(
!
page
->
buffers
)
BUG
();
page
->
owner
=
-
1
;
head
=
page
->
buffers
;
bh
=
head
;
...
...
@@ -1583,6 +1575,7 @@ int brw_page(int rw, struct page *page, kdev_t dev, int b[], int size, int bmap)
bh
->
b_list
=
BUF_DIRTY
;
insert_into_dirty_queue
(
bh
);
}
arr
[
nr
++
]
=
bh
;
}
bh
=
bh
->
b_this_page
;
}
while
(
bh
!=
head
);
...
...
@@ -1597,8 +1590,14 @@ int brw_page(int rw, struct page *page, kdev_t dev, int b[], int size, int bmap)
}
else
{
if
(
!
nr
&&
rw
==
READ
)
{
SetPageUptodate
(
page
);
page
->
owner
=
(
int
)
current
;
UnlockPage
(
page
);
}
if
(
nr
&&
(
rw
==
WRITE
))
{
unlock_kernel
();
ll_rw_block
(
rw
,
nr
,
arr
);
lock_kernel
();
}
}
return
0
;
}
...
...
fs/smbfs/inode.c
View file @
2fcc8e43
...
...
@@ -376,9 +376,6 @@ smb_read_super(struct super_block *sb, void *raw_data, int silent)
*
mnt
=
*
((
struct
smb_mount_data
*
)
raw_data
);
/* ** temp ** pass config flags in file mode */
mnt
->
version
=
(
mnt
->
file_mode
>>
9
);
#ifdef CONFIG_SMB_WIN95
mnt
->
version
|=
SMB_FIX_WIN95
;
#endif
mnt
->
file_mode
&=
(
S_IRWXU
|
S_IRWXG
|
S_IRWXO
);
mnt
->
file_mode
|=
S_IFREG
;
mnt
->
dir_mode
&=
(
S_IRWXU
|
S_IRWXG
|
S_IRWXO
);
...
...
@@ -387,8 +384,6 @@ smb_read_super(struct super_block *sb, void *raw_data, int silent)
/*
* Display the enabled options
*/
if
(
mnt
->
version
&
SMB_FIX_WIN95
)
printk
(
"SMBFS: Win 95 bug fixes enabled
\n
"
);
if
(
mnt
->
version
&
SMB_FIX_OLDATTR
)
printk
(
"SMBFS: Using core getattr (Win 95 speedup)
\n
"
);
else
if
(
mnt
->
version
&
SMB_FIX_DIRATTR
)
...
...
fs/smbfs/proc.c
View file @
2fcc8e43
This diff is collapsed.
Click to expand it.
include/linux/mm.h
View file @
2fcc8e43
...
...
@@ -167,6 +167,7 @@ typedef struct page {
#define LockPage(page) \
do { int _ret = test_and_set_bit(PG_locked, &(page)->flags); \
if (_ret) PAGE_BUG(page); \
if (page->owner) PAGE_BUG(page); \
page->owner = (int)current; } while (0)
#define TryLockPage(page) ({ int _ret = test_and_set_bit(PG_locked, &(page)->flags); \
if (!_ret) page->owner = (int)current; _ret; })
...
...
@@ -174,7 +175,7 @@ typedef struct page {
if (page->owner != (int)current) { \
BUG(); } page->owner = 0; \
if (!test_and_clear_bit(PG_locked, &(page)->flags)) { \
BUG(
); } wake_up(&page->wait); } while (0)
PAGE_BUG(page
); } wake_up(&page->wait); } while (0)
#define PageError(page) (test_bit(PG_error, &(page)->flags))
#define SetPageError(page) ({ int _ret = test_and_set_bit(PG_error, &(page)->flags); _ret; })
#define ClearPageError(page) do { if (!test_and_clear_bit(PG_error, &(page)->flags)) BUG(); } while (0)
...
...
include/linux/pagemap.h
View file @
2fcc8e43
...
...
@@ -70,6 +70,7 @@ extern struct page * __find_get_page (struct inode * inode,
__find_get_page(inode, offset, *page_hash(inode, offset))
extern
struct
page
*
__find_lock_page
(
struct
inode
*
inode
,
unsigned
long
offset
,
struct
page
*
page
);
extern
void
lock_page
(
struct
page
*
page
);
#define find_lock_page(inode, offset) \
__find_lock_page(inode, offset, *page_hash(inode, offset))
...
...
include/linux/smb.h
View file @
2fcc8e43
...
...
@@ -57,7 +57,7 @@ struct smb_conn_opt {
/* The following are NT LM 0.12 options */
__u32
maxraw
;
__u32
capabilities
;
__
u
16
serverzone
;
__
s
16
serverzone
;
};
#ifdef __KERNEL__
...
...
include/linux/smb_fs.h
View file @
2fcc8e43
...
...
@@ -77,6 +77,22 @@ smb_vfree(void *obj)
#define SMB_FIX_OLDATTR 0x0002
/* Use core getattr (Win 95 speedup) */
#define SMB_FIX_DIRATTR 0x0004
/* Use find_first for getattr */
/* NT1 protocol capability bits */
#define SMB_CAP_RAW_MODE 0x0001
#define SMB_CAP_MPX_MODE 0x0002
#define SMB_CAP_UNICODE 0x0004
#define SMB_CAP_LARGE_FILES 0x0008
#define SMB_CAP_NT_SMBS 0x0010
#define SMB_CAP_RPC_REMOTE_APIS 0x0020
#define SMB_CAP_STATUS32 0x0040
#define SMB_CAP_LEVEL_II_OPLOCKS 0x0080
#define SMB_CAP_LOCK_AND_READ 0x0100
#define SMB_CAP_NT_FIND 0x0200
#define SMB_CAP_DFS 0x1000
#define SMB_CAP_LARGE_READX 0x4000
/* linux/fs/smbfs/mmap.c */
int
smb_mmap
(
struct
file
*
,
struct
vm_area_struct
*
);
...
...
mm/filemap.c
View file @
2fcc8e43
...
...
@@ -80,7 +80,6 @@ static void remove_page_from_hash_queue(struct page * page)
atomic_dec
(
&
page_cache_size
);
}
void
invalidate_inode_pages
(
struct
inode
*
inode
)
{
struct
page
**
p
;
...
...
@@ -468,7 +467,7 @@ void ___wait_on_page(struct page *page)
/*
* Get an exclusive lock on the page..
*/
static
void
lock_page
(
struct
page
*
page
)
void
lock_page
(
struct
page
*
page
)
{
if
(
TryLockPage
(
page
))
{
struct
task_struct
*
tsk
=
current
;
...
...
@@ -479,6 +478,7 @@ static void lock_page(struct page *page)
tsk
->
state
=
TASK_UNINTERRUPTIBLE
;
while
(
TryLockPage
(
page
))
{
run_task_queue
(
&
tq_disk
);
schedule
();
tsk
->
state
=
TASK_UNINTERRUPTIBLE
;
}
...
...
@@ -1381,10 +1381,8 @@ static inline int do_write_page(struct inode * inode, struct file * file,
retval
=
-
EIO
;
writepage
=
inode
->
i_op
->
writepage
;
page
=
mem_map
+
MAP_NR
(
page_addr
);
repeat:
wait_on_page
(
page
);
if
(
TryLockPage
(
page
))
goto
repeat
;
lock_page
(
page
);
if
(
writepage
)
{
retval
=
writepage
(
file
,
page
);
}
else
{
...
...
mm/page_io.c
View file @
2fcc8e43
...
...
@@ -183,9 +183,6 @@ static void rw_swap_page_base(int rw, unsigned long entry, struct page *page, in
/* block_size == PAGE_SIZE/zones_used */
brw_page
(
rw
,
page
,
dev
,
zones
,
block_size
,
0
);
if
(
rw
==
WRITE
)
// HACK, FIXME
UnlockPage
(
page
);
/* Note! For consistency we do all of the logic,
* decrementing the page count, and unlocking the page in the
* swap lock map - in the IO completion handler.
...
...
mm/swap_state.c
View file @
2fcc8e43
...
...
@@ -219,7 +219,6 @@ static inline void remove_from_swap_cache(struct page *page)
#endif
PageClearSwapCache
(
page
);
remove_inode_page
(
page
);
page_cache_release
(
page
);
}
...
...
@@ -231,7 +230,7 @@ void delete_from_swap_cache(struct page *page)
{
long
entry
=
page
->
offset
;
LockP
age
(
page
);
lock_p
age
(
page
);
#ifdef SWAP_CACHE_INFO
swap_cache_del_total
++
;
...
...
@@ -242,8 +241,9 @@ void delete_from_swap_cache(struct page *page)
page_address
(
page
),
page_count
(
page
),
entry
);
#endif
remove_from_swap_cache
(
page
);
swap_free
(
entry
);
UnlockPage
(
page
);
page_cache_release
(
page
);
swap_free
(
entry
);
}
/*
...
...
net/ipv4/udp.c
View file @
2fcc8e43
...
...
@@ -655,11 +655,7 @@ int udp_sendmsg(struct sock *sk, struct msghdr *msg, int len)
if
(
msg
->
msg_namelen
<
sizeof
(
*
usin
))
return
(
-
EINVAL
);
if
(
usin
->
sin_family
!=
AF_INET
)
{
static
int
complained
;
if
(
!
complained
++
)
printk
(
KERN_WARNING
"%s forgot to set AF_INET in udp sendmsg. Fix it!
\n
"
,
current
->
comm
);
if
(
usin
->
sin_family
)
return
-
EINVAL
;
return
-
EINVAL
;
}
ufh
.
daddr
=
usin
->
sin_addr
.
s_addr
;
ufh
.
uh
.
dest
=
usin
->
sin_port
;
...
...
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