mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
[SCSI] Merge branch 'linus'
Conflicts: drivers/message/fusion/mptsas.c fixed up conflict between req->data_len accessors and mptsas driver updates. Signed-off-by: James Bottomley <[email protected]>
This commit is contained in:
commit
82681a318f
1794 changed files with 103107 additions and 34819 deletions
|
|
@ -50,10 +50,10 @@ int exofs_check_ok_resid(struct osd_request *or, u64 *in_resid, u64 *out_resid)
|
|||
|
||||
/* FIXME: should be include in osd_sense_info */
|
||||
if (in_resid)
|
||||
*in_resid = or->in.req ? or->in.req->data_len : 0;
|
||||
*in_resid = or->in.req ? or->in.req->resid_len : 0;
|
||||
|
||||
if (out_resid)
|
||||
*out_resid = or->out.req ? or->out.req->data_len : 0;
|
||||
*out_resid = or->out.req ? or->out.req->resid_len : 0;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -200,20 +200,21 @@ static const struct export_operations exofs_export_ops;
|
|||
/*
|
||||
* Write the superblock to the OSD
|
||||
*/
|
||||
static void exofs_write_super(struct super_block *sb)
|
||||
static int exofs_sync_fs(struct super_block *sb, int wait)
|
||||
{
|
||||
struct exofs_sb_info *sbi;
|
||||
struct exofs_fscb *fscb;
|
||||
struct osd_request *or;
|
||||
struct osd_obj_id obj;
|
||||
int ret;
|
||||
int ret = -ENOMEM;
|
||||
|
||||
fscb = kzalloc(sizeof(struct exofs_fscb), GFP_KERNEL);
|
||||
if (!fscb) {
|
||||
EXOFS_ERR("exofs_write_super: memory allocation failed.\n");
|
||||
return;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
lock_super(sb);
|
||||
lock_kernel();
|
||||
sbi = sb->s_fs_info;
|
||||
fscb->s_nextid = cpu_to_le64(sbi->s_nextid);
|
||||
|
|
@ -246,7 +247,17 @@ out:
|
|||
if (or)
|
||||
osd_end_request(or);
|
||||
unlock_kernel();
|
||||
unlock_super(sb);
|
||||
kfree(fscb);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void exofs_write_super(struct super_block *sb)
|
||||
{
|
||||
if (!(sb->s_flags & MS_RDONLY))
|
||||
exofs_sync_fs(sb, 1);
|
||||
else
|
||||
sb->s_dirt = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -258,6 +269,11 @@ static void exofs_put_super(struct super_block *sb)
|
|||
int num_pend;
|
||||
struct exofs_sb_info *sbi = sb->s_fs_info;
|
||||
|
||||
lock_kernel();
|
||||
|
||||
if (sb->s_dirt)
|
||||
exofs_write_super(sb);
|
||||
|
||||
/* make sure there are no pending commands */
|
||||
for (num_pend = atomic_read(&sbi->s_curr_pending); num_pend > 0;
|
||||
num_pend = atomic_read(&sbi->s_curr_pending)) {
|
||||
|
|
@ -271,6 +287,8 @@ static void exofs_put_super(struct super_block *sb)
|
|||
osduld_put_device(sbi->s_dev);
|
||||
kfree(sb->s_fs_info);
|
||||
sb->s_fs_info = NULL;
|
||||
|
||||
unlock_kernel();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -484,6 +502,7 @@ static const struct super_operations exofs_sops = {
|
|||
.delete_inode = exofs_delete_inode,
|
||||
.put_super = exofs_put_super,
|
||||
.write_super = exofs_write_super,
|
||||
.sync_fs = exofs_sync_fs,
|
||||
.statfs = exofs_statfs,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue