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
7ef17402
Commit
7ef17402
authored
Jun 09, 2002
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Undo bogus 390 block layer merge (which re-introduced long-gone
hardsects array) Courtesty of Martin Dalecki
parent
b9de2e44
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
16 deletions
+1
-16
drivers/s390/block/xpram.c
drivers/s390/block/xpram.c
+1
-16
No files found.
drivers/s390/block/xpram.c
View file @
7ef17402
...
...
@@ -158,7 +158,6 @@ MODULE_PARM_DESC(sizes, "list of device (partition) sizes " \
/* The following items are obtained through kmalloc() in init_module() */
Xpram_Dev
*
xpram_devices
=
NULL
;
int
*
xpram_hardsects
=
NULL
;
int
*
xpram_offsets
=
NULL
;
/* partition offsets */
#define MIN(x,y) ((x) < (y) ? (x) : (y))
...
...
@@ -939,6 +938,7 @@ int xpram_init(void)
q
=
BLK_DEFAULT_QUEUE
(
major
);
blk_init_queue
(
q
,
xpram_request
);
blk_queue_hardsect_size
(
q
,
xpram_hardsect
);
/* we want to have XPRAM_UNUSED blocks security buffer between devices */
mem_usable
=
xpram_mem_avail
-
(
XPRAM_UNUSED
*
(
xpram_devs
-
1
));
...
...
@@ -978,16 +978,6 @@ int xpram_init(void)
PRINT_DEBUG(" device(%d) offset = %d kB, size = %d kB\n",i, xpram_offsets[i], xpram_sizes[i]);
#endif
xpram_hardsects
=
kmalloc
(
xpram_devs
*
sizeof
(
int
),
GFP_KERNEL
);
if
(
!
xpram_hardsects
)
{
PRINT_ERR
(
"Not enough memory for xpram_hardsects
\n
"
);
PRINT_ERR
(
"Giving up xpram
\n
"
);
goto
fail_malloc_hardsects
;
}
for
(
i
=
0
;
i
<
xpram_devs
;
i
++
)
/* all the same hardsect */
xpram_hardsects
[
i
]
=
xpram_hardsect
;
hardsect_size
[
major
]
=
xpram_hardsects
;
/*
* allocate the devices -- we can't have them static, as the number
* can be specified at load time
...
...
@@ -1040,7 +1030,6 @@ int xpram_init(void)
goto fail_devfs_register;
}
#endif /* WHY? */
}
return
0
;
/* succeed */
...
...
@@ -1053,10 +1042,7 @@ int xpram_init(void)
}
kfree
(
xpram_devices
);
kfree
(
xpram_offsets
);
fail_malloc_hardsects:
fail_malloc_devices:
kfree
(
xpram_hardsects
);
hardsect_size
[
major
]
=
NULL
;
fail_malloc:
/* ??? unregister_chrdev(major, "xpram"); */
unregister_blkdev
(
major
,
"xpram"
);
...
...
@@ -1086,7 +1072,6 @@ void cleanup_module(void)
int
i
;
/* first of all, reset all the data structures */
kfree
(
hardsect_size
[
major
]);
kfree
(
xpram_offsets
);
blk_clear
(
major
);
...
...
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