mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 08:44:21 +08:00
Merge branch 'master' of git://git.infradead.org/ubi-2.6
This commit is contained in:
commit
a52c8afdd0
@ -104,12 +104,9 @@ static int vol_cdev_open(struct inode *inode, struct file *file)
|
||||
struct ubi_volume_desc *desc;
|
||||
int vol_id = iminor(inode) - 1, mode, ubi_num;
|
||||
|
||||
lock_kernel();
|
||||
ubi_num = ubi_major2num(imajor(inode));
|
||||
if (ubi_num < 0) {
|
||||
unlock_kernel();
|
||||
if (ubi_num < 0)
|
||||
return ubi_num;
|
||||
}
|
||||
|
||||
if (file->f_mode & FMODE_WRITE)
|
||||
mode = UBI_READWRITE;
|
||||
@ -119,7 +116,6 @@ static int vol_cdev_open(struct inode *inode, struct file *file)
|
||||
dbg_gen("open volume %d, mode %d", vol_id, mode);
|
||||
|
||||
desc = ubi_open_volume(ubi_num, vol_id, mode);
|
||||
unlock_kernel();
|
||||
if (IS_ERR(desc))
|
||||
return PTR_ERR(desc);
|
||||
|
||||
|
@ -387,7 +387,7 @@ int ubi_scan_add_used(struct ubi_device *ubi, struct ubi_scan_info *si,
|
||||
pnum, vol_id, lnum, ec, sqnum, bitflips);
|
||||
|
||||
sv = add_volume(si, vol_id, pnum, vid_hdr);
|
||||
if (IS_ERR(sv) < 0)
|
||||
if (IS_ERR(sv))
|
||||
return PTR_ERR(sv);
|
||||
|
||||
if (si->max_sqnum < sqnum)
|
||||
|
@ -244,8 +244,8 @@ static int vtbl_check(const struct ubi_device *ubi,
|
||||
}
|
||||
|
||||
if (reserved_pebs > ubi->good_peb_count) {
|
||||
dbg_err("too large reserved_pebs, good PEBs %d",
|
||||
ubi->good_peb_count);
|
||||
dbg_err("too large reserved_pebs %d, good PEBs %d",
|
||||
reserved_pebs, ubi->good_peb_count);
|
||||
err = 9;
|
||||
goto bad;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user