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
fc2dcf95
Commit
fc2dcf95
authored
May 26, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://linus@bkbits.net/linux-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux
parents
b16d3cbc
b88ac404
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
128 additions
and
53 deletions
+128
-53
drivers/block/ll_rw_blk.c
drivers/block/ll_rw_blk.c
+80
-23
drivers/video/i810/i810.h
drivers/video/i810/i810.h
+2
-2
drivers/video/i810/i810_main.c
drivers/video/i810/i810_main.c
+0
-5
drivers/video/i810/i810_main.h
drivers/video/i810/i810_main.h
+0
-1
drivers/video/sis/sis_main.c
drivers/video/sis/sis_main.c
+4
-4
fs/char_dev.c
fs/char_dev.c
+2
-0
fs/cifs/cifsfs.c
fs/cifs/cifsfs.c
+8
-4
fs/cifs/connect.c
fs/cifs/connect.c
+18
-6
fs/cifs/netmisc.c
fs/cifs/netmisc.c
+9
-6
fs/cifs/smberr.h
fs/cifs/smberr.h
+2
-1
include/linux/blkdev.h
include/linux/blkdev.h
+3
-1
No files found.
drivers/block/ll_rw_blk.c
View file @
fc2dcf95
...
...
@@ -413,11 +413,12 @@ struct request *blk_queue_find_tag(request_queue_t *q, int tag)
{
struct
blk_queue_tag
*
bqt
=
q
->
queue_tags
;
if
(
unlikely
(
bqt
==
NULL
||
bqt
->
max_depth
<
tag
))
if
(
unlikely
(
bqt
==
NULL
||
tag
>=
bqt
->
real_max_depth
))
return
NULL
;
return
bqt
->
tag_index
[
tag
];
}
/**
* blk_queue_free_tags - release tag maintenance info
* @q: the request queue for the device
...
...
@@ -448,39 +449,28 @@ void blk_queue_free_tags(request_queue_t *q)
q
->
queue_flags
&=
~
(
1
<<
QUEUE_FLAG_QUEUED
);
}
/**
* blk_queue_init_tags - initialize the queue tag info
* @q: the request queue for the device
* @depth: the maximum queue depth supported
**/
int
blk_queue_init_tags
(
request_queue_t
*
q
,
int
depth
)
static
int
init_tag_map
(
struct
blk_queue_tag
*
tags
,
int
depth
)
{
struct
blk_queue_tag
*
tags
;
int
bits
,
i
;
if
(
depth
>
(
queue_nr_requests
*
2
))
{
depth
=
(
queue_nr_requests
*
2
);
printk
(
"blk_queue_init_tags: adjusted depth to %d
\n
"
,
depth
);
printk
(
KERN_ERR
"%s: adjusted depth to %d
\n
"
,
__FUNCTION__
,
depth
);
}
tags
=
kmalloc
(
sizeof
(
struct
blk_queue_tag
),
GFP_ATOMIC
);
if
(
!
tags
)
goto
fail
;
tags
->
tag_index
=
kmalloc
(
depth
*
sizeof
(
struct
request
*
),
GFP_ATOMIC
);
if
(
!
tags
->
tag_index
)
goto
fail
_index
;
goto
fail
;
bits
=
(
depth
/
BLK_TAGS_PER_LONG
)
+
1
;
tags
->
tag_map
=
kmalloc
(
bits
*
sizeof
(
unsigned
long
),
GFP_ATOMIC
);
if
(
!
tags
->
tag_map
)
goto
fail
_map
;
goto
fail
;
memset
(
tags
->
tag_index
,
0
,
depth
*
sizeof
(
struct
request
*
));
memset
(
tags
->
tag_map
,
0
,
bits
*
sizeof
(
unsigned
long
));
INIT_LIST_HEAD
(
&
tags
->
busy_list
);
tags
->
busy
=
0
;
tags
->
max_depth
=
depth
;
tags
->
real_max_depth
=
bits
*
BITS_PER_LONG
;
/*
* set the upper bits if the depth isn't a multiple of the word size
...
...
@@ -488,19 +478,86 @@ int blk_queue_init_tags(request_queue_t *q, int depth)
for
(
i
=
depth
;
i
<
bits
*
BLK_TAGS_PER_LONG
;
i
++
)
__set_bit
(
i
,
tags
->
tag_map
);
return
0
;
fail:
kfree
(
tags
->
tag_index
);
return
-
ENOMEM
;
}
/**
* blk_queue_init_tags - initialize the queue tag info
* @q: the request queue for the device
* @depth: the maximum queue depth supported
**/
int
blk_queue_init_tags
(
request_queue_t
*
q
,
int
depth
)
{
struct
blk_queue_tag
*
tags
;
tags
=
kmalloc
(
sizeof
(
struct
blk_queue_tag
),
GFP_ATOMIC
);
if
(
!
tags
)
goto
fail
;
if
(
init_tag_map
(
tags
,
depth
))
goto
fail
;
INIT_LIST_HEAD
(
&
tags
->
busy_list
);
tags
->
busy
=
0
;
/*
* assign it, all done
*/
q
->
queue_tags
=
tags
;
q
->
queue_flags
|=
(
1
<<
QUEUE_FLAG_QUEUED
);
return
0
;
fail_map:
kfree
(
tags
->
tag_index
);
fail_index:
kfree
(
tags
);
fail:
kfree
(
tags
);
return
-
ENOMEM
;
}
/**
* blk_queue_resize_tags - change the queueing depth
* @q: the request queue for the device
* @new_depth: the new max command queueing depth
*
* Notes:
* Must be called with the queue lock held.
**/
int
blk_queue_resize_tags
(
request_queue_t
*
q
,
int
new_depth
)
{
struct
blk_queue_tag
*
bqt
=
q
->
queue_tags
;
struct
request
**
tag_index
;
unsigned
long
*
tag_map
;
int
bits
,
max_depth
;
if
(
!
bqt
)
return
-
ENXIO
;
/*
* don't bother sizing down
*/
if
(
new_depth
<=
bqt
->
real_max_depth
)
{
bqt
->
max_depth
=
new_depth
;
return
0
;
}
/*
* save the old state info, so we can copy it back
*/
tag_index
=
bqt
->
tag_index
;
tag_map
=
bqt
->
tag_map
;
max_depth
=
bqt
->
real_max_depth
;
if
(
init_tag_map
(
bqt
,
new_depth
))
return
-
ENOMEM
;
memcpy
(
bqt
->
tag_index
,
tag_index
,
max_depth
*
sizeof
(
struct
request
*
));
bits
=
max_depth
/
BLK_TAGS_PER_LONG
;
memcpy
(
bqt
->
tag_map
,
bqt
->
tag_map
,
bits
*
sizeof
(
unsigned
long
));
kfree
(
tag_index
);
kfree
(
tag_map
);
return
0
;
}
/**
...
...
@@ -524,7 +581,7 @@ void blk_queue_end_tag(request_queue_t *q, struct request *rq)
BUG_ON
(
tag
==
-
1
);
if
(
unlikely
(
tag
>=
bqt
->
max_depth
))
if
(
unlikely
(
tag
>=
bqt
->
real_
max_depth
))
return
;
if
(
unlikely
(
!
__test_and_clear_bit
(
tag
,
bqt
->
tag_map
)))
{
...
...
drivers/video/i810/i810.h
View file @
fc2dcf95
...
...
@@ -203,8 +203,8 @@
#define LOCKUP 8
struct
gtt_data
{
agp_memory
*
i810_fb_memory
;
agp_memory
*
i810_cursor_memory
;
struct
agp_memory
*
i810_fb_memory
;
struct
agp_memory
*
i810_cursor_memory
;
};
struct
mode_registers
{
...
...
drivers/video/i810/i810_main.c
View file @
fc2dcf95
...
...
@@ -1926,11 +1926,6 @@ static void __exit i810fb_remove_pci(struct pci_dev *dev)
#ifndef MODULE
int
__init
i810fb_init
(
void
)
{
if
(
agp_init
())
{
printk
(
"i810fb_init: cannot initialize agpgart
\n
"
);
return
-
ENODEV
;
}
if
(
agp_intel_init
())
{
printk
(
"i810fb_init: cannot initialize intel agpgart
\n
"
);
return
-
ENODEV
;
...
...
drivers/video/i810/i810_main.h
View file @
fc2dcf95
...
...
@@ -111,7 +111,6 @@ static int i810fb_blank (int blank_mode, struct fb_info *info);
/* Initialization */
static
void
i810fb_release_resource
(
struct
fb_info
*
info
,
struct
i810fb_par
*
par
);
extern
int
__init
agp_intel_init
(
void
);
extern
int
__init
agp_init
(
void
);
/* Video Timings */
...
...
drivers/video/sis/sis_main.c
View file @
fc2dcf95
...
...
@@ -2868,8 +2868,8 @@ static int sisfb_heap_init(void)
unsigned
long
*
write_port
=
0
;
SIS_CMDTYPE
cmd_type
;
#ifndef AGPOFF
agp_kern_info
*
agp_info
;
agp_memory
*
agp
;
struct
agp_kern_info
*
agp_info
;
struct
agp_memory
*
agp
;
u32
agp_phys
;
#endif
#endif
...
...
@@ -2946,8 +2946,8 @@ static int sisfb_heap_init(void)
#ifndef AGPOFF
if
(
sisfb_queuemode
==
AGP_CMD_QUEUE
)
{
agp_info
=
vmalloc
(
sizeof
(
agp_kern
_info
));
memset
((
void
*
)
agp_info
,
0x00
,
sizeof
(
agp_kern
_info
));
agp_info
=
vmalloc
(
sizeof
(
*
agp
_info
));
memset
((
void
*
)
agp_info
,
0x00
,
sizeof
(
*
agp
_info
));
agp_copy_info
(
agp_info
);
agp_backend_acquire
();
...
...
fs/char_dev.c
View file @
fc2dcf95
...
...
@@ -89,6 +89,8 @@ __register_chrdev_region(unsigned int major, unsigned int baseminor,
if
(
cd
==
NULL
)
return
ERR_PTR
(
-
ENOMEM
);
memset
(
cd
,
0
,
sizeof
(
struct
char_device_struct
));
write_lock_irq
(
&
chrdevs_lock
);
/* temporary */
...
...
fs/cifs/cifsfs.c
View file @
fc2dcf95
...
...
@@ -94,13 +94,17 @@ cifs_read_super(struct super_block *sb, void *data,
sb
->
s_blocksize_bits
=
14
;
/* default 2**14 = CIFS_MAX_MSGSIZE */
inode
=
iget
(
sb
,
ROOT_I
);
if
(
!
inode
)
if
(
!
inode
)
{
rc
=
-
ENOMEM
;
goto
out_no_root
;
}
sb
->
s_root
=
d_alloc_root
(
inode
);
if
(
!
sb
->
s_root
)
if
(
!
sb
->
s_root
)
{
rc
=
-
ENOMEM
;
goto
out_no_root
;
}
return
0
;
...
...
@@ -114,7 +118,7 @@ cifs_read_super(struct super_block *sb, void *data,
unload_nls
(
cifs_sb
->
local_nls
);
if
(
cifs_sb
)
kfree
(
cifs_sb
);
return
-
EINVAL
;
return
rc
;
}
void
...
...
fs/cifs/connect.c
View file @
fc2dcf95
...
...
@@ -346,6 +346,7 @@ parse_mount_options(char *options, const char *devname, struct smb_vol *vol)
{
char
*
value
;
char
*
data
;
int
temp_len
;
memset
(
vol
,
0
,
sizeof
(
struct
smb_vol
));
vol
->
linux_uid
=
current
->
uid
;
/* current->euid instead? */
...
...
@@ -398,8 +399,9 @@ parse_mount_options(char *options, const char *devname, struct smb_vol *vol)
"CIFS: invalid path to network resource
\n
"
);
return
1
;
/* needs_arg; */
}
if
(
strnlen
(
value
,
300
)
<
300
)
{
vol
->
UNC
=
value
;
if
((
temp_len
=
strnlen
(
value
,
300
))
<
300
)
{
vol
->
UNC
=
kmalloc
(
GFP_KERNEL
,
temp_len
);
strcpy
(
vol
->
UNC
,
value
);
if
(
strncmp
(
vol
->
UNC
,
"//"
,
2
)
==
0
)
{
vol
->
UNC
[
0
]
=
'\\'
;
vol
->
UNC
[
1
]
=
'\\'
;
...
...
@@ -472,8 +474,9 @@ parse_mount_options(char *options, const char *devname, struct smb_vol *vol)
printk
(
KERN_WARNING
"CIFS: Missing UNC name for mount target
\n
"
);
return
1
;
}
if
(
strnlen
(
devname
,
300
)
<
300
)
{
vol
->
UNC
=
devname
;
if
((
temp_len
=
strnlen
(
devname
,
300
))
<
300
)
{
vol
->
UNC
=
kmalloc
(
GFP_KERNEL
,
temp_len
);
strcpy
(
vol
->
UNC
,
devname
);
if
(
strncmp
(
vol
->
UNC
,
"//"
,
2
)
==
0
)
{
vol
->
UNC
[
0
]
=
'\\'
;
vol
->
UNC
[
1
]
=
'\\'
;
...
...
@@ -812,6 +815,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
cFYI
(
1
,
(
"Entering cifs_mount. Xid: %d with: %s"
,
xid
,
mount_data
));
if
(
parse_mount_options
(
mount_data
,
devname
,
&
volume_info
))
{
if
(
volume_info
.
UNC
)
kfree
(
volume_info
.
UNC
);
FreeXid
(
xid
);
return
-
EINVAL
;
}
...
...
@@ -852,6 +857,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
(
"Error connecting to IPv4 socket. Aborting operation"
));
if
(
csocket
!=
NULL
)
sock_release
(
csocket
);
if
(
volume_info
.
UNC
)
kfree
(
volume_info
.
UNC
);
FreeXid
(
xid
);
return
rc
;
}
...
...
@@ -860,6 +867,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
if
(
srvTcp
==
NULL
)
{
rc
=
-
ENOMEM
;
sock_release
(
csocket
);
if
(
volume_info
.
UNC
)
kfree
(
volume_info
.
UNC
);
FreeXid
(
xid
);
return
rc
;
}
else
{
...
...
@@ -943,6 +952,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
""
,
cifs_sb
->
local_nls
);
if
(
volume_info
.
UNC
)
kfree
(
volume_info
.
UNC
);
FreeXid
(
xid
);
return
-
ENODEV
;
}
else
{
...
...
@@ -995,7 +1006,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
if
(
tcon
->
ses
->
capabilities
&
CAP_UNIX
)
CIFSSMBQFSUnixInfo
(
xid
,
tcon
,
cifs_sb
->
local_nls
);
}
if
(
volume_info
.
UNC
)
kfree
(
volume_info
.
UNC
);
FreeXid
(
xid
);
return
rc
;
}
...
...
fs/cifs/netmisc.c
View file @
fc2dcf95
...
...
@@ -46,7 +46,7 @@ struct smb_to_posix_error {
const
struct
smb_to_posix_error
mapping_table_ERRDOS
[]
=
{
{
ERRbadfunc
,
-
EINVAL
},
{
ERRbadfile
,
-
ENOENT
},
{
ERRbadpath
,
-
ENO
ENT
},
{
ERRbadpath
,
-
ENO
TDIR
},
{
ERRnofids
,
-
EMFILE
},
{
ERRnoaccess
,
-
EACCES
},
{
ERRbadfid
,
-
EBADF
},
...
...
@@ -63,26 +63,29 @@ const struct smb_to_posix_error mapping_table_ERRDOS[] = {
{
ERRnofiles
,
-
ENOENT
},
{
ERRbadshare
,
-
ETXTBSY
},
{
ERRlock
,
-
EACCES
},
{
ERRfilexists
,
-
EINVAL
},
{
ERRunsup
,
-
EINVAL
},
{
ERRnosuchshare
,
-
ENXIO
},
{
ERRfilexists
,
-
EEXIST
},
{
ERRinvparm
,
-
EINVAL
},
{
ERRdiskfull
,
-
ENOSPC
},
{
ERRinvn
um
,
-
EINVAL
},
{
ERRinvn
ame
,
-
ENOENT
},
{
ERRdirnotempty
,
-
ENOTEMPTY
},
{
ERRnotlocked
,
-
ENOLCK
},
{
ERRalreadyexists
,
-
EEXIST
},
{
ERRmoredata
,
-
EOVERFLOW
},
{
ErrQuota
,
-
EDQUOT
},
{
ErrNotALink
,
-
ENOLINK
},
{
ERRnetlogonNotStarted
,
-
ENOPROTOOPT
},
{
0
,
0
}
};
const
struct
smb_to_posix_error
mapping_table_ERRSRV
[]
=
{
{
ERRerror
,
-
EIO
},
{
ERRbadpw
,
-
E
ACCES
},
{
ERRbadpw
,
-
E
PERM
},
{
ERRbadtype
,
-
EREMOTE
},
{
ERRaccess
,
-
EACCES
},
{
ERRinvtid
,
-
ENXIO
},
{
ERRinvnetname
,
-
ENO
ENT
},
{
ERRinvnetname
,
-
ENO
DEV
},
{
ERRinvdevice
,
-
ENXIO
},
{
ERRqfull
,
-
ENOSPC
},
{
ERRqtoobig
,
-
ENOSPC
},
...
...
@@ -617,7 +620,7 @@ static const struct {
ERRHRD
,
ERRgeneral
,
NT_STATUS_EVENTLOG_CANT_START
},
{
ERRDOS
,
ERRnoaccess
,
NT_STATUS_TRUST_FAILURE
},
{
ERRHRD
,
ERRgeneral
,
NT_STATUS_MUTANT_LIMIT_EXCEEDED
},
{
ERRDOS
,
2455
,
NT_STATUS_NETLOGON_NOT_STARTED
},
{
ERRDOS
,
ERRnetlogonNotStarted
,
NT_STATUS_NETLOGON_NOT_STARTED
},
{
ERRSRV
,
2239
,
NT_STATUS_ACCOUNT_EXPIRED
},
{
ERRHRD
,
ERRgeneral
,
NT_STATUS_POSSIBLE_DEADLOCK
},
{
ERRHRD
,
ERRgeneral
,
NT_STATUS_NETWORK_CREDENTIAL_CONFLICT
},
{
...
...
fs/cifs/smberr.h
View file @
fc2dcf95
...
...
@@ -59,7 +59,7 @@
#define ERRfilexists 80
/* The file named in the request already exists. */
#define ERRinvparm 87
#define ERRdiskfull 112
#define ERRinvn
um
123
#define ERRinvn
ame
123
#define ERRdirnotempty 145
#define ERRnotlocked 158
#define ERRalreadyexists 183
...
...
@@ -109,4 +109,5 @@ class.*/
#define ERRbadclient 2240
#define ERRbadLogonTime 2241
#define ERRpasswordExpired 2242
#define ERRnetlogonNotStarted 2455
#define ERRnosupport 0xFFFF
include/linux/blkdev.h
View file @
fc2dcf95
...
...
@@ -179,7 +179,8 @@ struct blk_queue_tag {
unsigned
long
*
tag_map
;
/* bit map of free/busy tags */
struct
list_head
busy_list
;
/* fifo list of busy tags */
int
busy
;
/* current depth */
int
max_depth
;
int
max_depth
;
/* what we will send to device */
int
real_max_depth
;
/* what the array can hold */
};
struct
request_queue
...
...
@@ -452,6 +453,7 @@ extern struct request *blk_queue_find_tag(request_queue_t *, int);
extern
void
blk_queue_end_tag
(
request_queue_t
*
,
struct
request
*
);
extern
int
blk_queue_init_tags
(
request_queue_t
*
,
int
);
extern
void
blk_queue_free_tags
(
request_queue_t
*
);
extern
int
blk_queue_resize_tags
(
request_queue_t
*
,
int
);
extern
void
blk_queue_invalidate_tags
(
request_queue_t
*
);
extern
void
blk_congestion_wait
(
int
rw
,
long
timeout
);
...
...
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