Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
986837ba
Commit
986837ba
authored
May 20, 2008
by
Arnd Bergmann
Committed by
Jonathan Corbet
Jun 20, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
block-dasd_eer: BKL pushdown
Signed-off-by:
Arnd Bergmann
<
arnd@arndb.de
>
parent
9a8bd2f7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
drivers/s390/block/dasd_eer.c
drivers/s390/block/dasd_eer.c
+6
-0
No files found.
drivers/s390/block/dasd_eer.c
View file @
986837ba
...
...
@@ -15,6 +15,7 @@
#include <linux/device.h>
#include <linux/poll.h>
#include <linux/mutex.h>
#include <linux/smp_lock.h>
#include <asm/uaccess.h>
#include <asm/atomic.h>
...
...
@@ -525,6 +526,7 @@ static int dasd_eer_open(struct inode *inp, struct file *filp)
eerb
=
kzalloc
(
sizeof
(
struct
eerbuffer
),
GFP_KERNEL
);
if
(
!
eerb
)
return
-
ENOMEM
;
lock_kernel
();
eerb
->
buffer_page_count
=
eer_pages
;
if
(
eerb
->
buffer_page_count
<
1
||
eerb
->
buffer_page_count
>
INT_MAX
/
PAGE_SIZE
)
{
...
...
@@ -532,6 +534,7 @@ static int dasd_eer_open(struct inode *inp, struct file *filp)
MESSAGE
(
KERN_WARNING
,
"can't open device since module "
"parameter eer_pages is smaller then 1 or"
" bigger then %d"
,
(
int
)(
INT_MAX
/
PAGE_SIZE
));
unlock_kernel
();
return
-
EINVAL
;
}
eerb
->
buffersize
=
eerb
->
buffer_page_count
*
PAGE_SIZE
;
...
...
@@ -539,12 +542,14 @@ static int dasd_eer_open(struct inode *inp, struct file *filp)
GFP_KERNEL
);
if
(
!
eerb
->
buffer
)
{
kfree
(
eerb
);
unlock_kernel
();
return
-
ENOMEM
;
}
if
(
dasd_eer_allocate_buffer_pages
(
eerb
->
buffer
,
eerb
->
buffer_page_count
))
{
kfree
(
eerb
->
buffer
);
kfree
(
eerb
);
unlock_kernel
();
return
-
ENOMEM
;
}
filp
->
private_data
=
eerb
;
...
...
@@ -552,6 +557,7 @@ static int dasd_eer_open(struct inode *inp, struct file *filp)
list_add
(
&
eerb
->
list
,
&
bufferlist
);
spin_unlock_irqrestore
(
&
bufferlock
,
flags
);
unlock_kernel
();
return
nonseekable_open
(
inp
,
filp
);
}
...
...
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