diff options
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/cifs/misc.c | 2 | ||||
| -rw-r--r-- | fs/fcntl.c | 4 | ||||
| -rw-r--r-- | fs/nfsd/nfs3xdr.c | 2 | ||||
| -rw-r--r-- | fs/nilfs2/cpfile.c | 2 | ||||
| -rw-r--r-- | fs/nilfs2/inode.c | 1 | ||||
| -rw-r--r-- | fs/nilfs2/ioctl.c | 6 | ||||
| -rw-r--r-- | fs/proc/array.c | 2 | ||||
| -rw-r--r-- | fs/xfs/xfs_log_recover.c | 4 | ||||
| -rw-r--r-- | fs/xfs/xfs_trans_ail.c | 23 |
9 files changed, 32 insertions, 14 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c index 1e25efcb55c8..d27d4ec6579b 100644 --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c | |||
| @@ -720,7 +720,7 @@ void | |||
| 720 | cifs_autodisable_serverino(struct cifs_sb_info *cifs_sb) | 720 | cifs_autodisable_serverino(struct cifs_sb_info *cifs_sb) |
| 721 | { | 721 | { |
| 722 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { | 722 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { |
| 723 | cifs_sb->mnt_cifs_flags &= CIFS_MOUNT_SERVER_INUM; | 723 | cifs_sb->mnt_cifs_flags &= ~CIFS_MOUNT_SERVER_INUM; |
| 724 | cERROR(1, ("Autodisabling the use of server inode numbers on " | 724 | cERROR(1, ("Autodisabling the use of server inode numbers on " |
| 725 | "%s. This server doesn't seem to support them " | 725 | "%s. This server doesn't seem to support them " |
| 726 | "properly. Hardlinks will not be recognized on this " | 726 | "properly. Hardlinks will not be recognized on this " |
diff --git a/fs/fcntl.c b/fs/fcntl.c index fc089f2f7f56..2cf93ec40a67 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c | |||
| @@ -284,7 +284,7 @@ static int f_setown_ex(struct file *filp, unsigned long arg) | |||
| 284 | type = PIDTYPE_PID; | 284 | type = PIDTYPE_PID; |
| 285 | break; | 285 | break; |
| 286 | 286 | ||
| 287 | case F_OWNER_GID: | 287 | case F_OWNER_PGRP: |
| 288 | type = PIDTYPE_PGID; | 288 | type = PIDTYPE_PGID; |
| 289 | break; | 289 | break; |
| 290 | 290 | ||
| @@ -321,7 +321,7 @@ static int f_getown_ex(struct file *filp, unsigned long arg) | |||
| 321 | break; | 321 | break; |
| 322 | 322 | ||
| 323 | case PIDTYPE_PGID: | 323 | case PIDTYPE_PGID: |
| 324 | owner.type = F_OWNER_GID; | 324 | owner.type = F_OWNER_PGRP; |
| 325 | break; | 325 | break; |
| 326 | 326 | ||
| 327 | default: | 327 | default: |
diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c index edf926e1062f..d0a2ce1b4324 100644 --- a/fs/nfsd/nfs3xdr.c +++ b/fs/nfsd/nfs3xdr.c | |||
| @@ -958,7 +958,7 @@ encode_entry(struct readdir_cd *ccd, const char *name, int namlen, | |||
| 958 | p1 = encode_entry_baggage(cd, p1, name, namlen, ino); | 958 | p1 = encode_entry_baggage(cd, p1, name, namlen, ino); |
| 959 | 959 | ||
| 960 | if (plus) | 960 | if (plus) |
| 961 | p = encode_entryplus_baggage(cd, p1, name, namlen); | 961 | p1 = encode_entryplus_baggage(cd, p1, name, namlen); |
| 962 | 962 | ||
| 963 | /* determine entry word length and lengths to go in pages */ | 963 | /* determine entry word length and lengths to go in pages */ |
| 964 | num_entry_words = p1 - tmp; | 964 | num_entry_words = p1 - tmp; |
diff --git a/fs/nilfs2/cpfile.c b/fs/nilfs2/cpfile.c index 1c6cfb59128d..3f5d5d06f53c 100644 --- a/fs/nilfs2/cpfile.c +++ b/fs/nilfs2/cpfile.c | |||
| @@ -871,7 +871,6 @@ int nilfs_cpfile_change_cpmode(struct inode *cpfile, __u64 cno, int mode) | |||
| 871 | * exclusive with a new mount job. Though it doesn't cover | 871 | * exclusive with a new mount job. Though it doesn't cover |
| 872 | * umount, it's enough for the purpose. | 872 | * umount, it's enough for the purpose. |
| 873 | */ | 873 | */ |
| 874 | mutex_lock(&nilfs->ns_mount_mutex); | ||
| 875 | if (nilfs_checkpoint_is_mounted(nilfs, cno, 1)) { | 874 | if (nilfs_checkpoint_is_mounted(nilfs, cno, 1)) { |
| 876 | /* Current implementation does not have to protect | 875 | /* Current implementation does not have to protect |
| 877 | plain read-only mounts since they are exclusive | 876 | plain read-only mounts since they are exclusive |
| @@ -880,7 +879,6 @@ int nilfs_cpfile_change_cpmode(struct inode *cpfile, __u64 cno, int mode) | |||
| 880 | ret = -EBUSY; | 879 | ret = -EBUSY; |
| 881 | } else | 880 | } else |
| 882 | ret = nilfs_cpfile_clear_snapshot(cpfile, cno); | 881 | ret = nilfs_cpfile_clear_snapshot(cpfile, cno); |
| 883 | mutex_unlock(&nilfs->ns_mount_mutex); | ||
| 884 | return ret; | 882 | return ret; |
| 885 | case NILFS_SNAPSHOT: | 883 | case NILFS_SNAPSHOT: |
| 886 | return nilfs_cpfile_set_snapshot(cpfile, cno); | 884 | return nilfs_cpfile_set_snapshot(cpfile, cno); |
diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c index 5040220c3732..2a0a5a3ac134 100644 --- a/fs/nilfs2/inode.c +++ b/fs/nilfs2/inode.c | |||
| @@ -664,7 +664,6 @@ int nilfs_load_inode_block(struct nilfs_sb_info *sbi, struct inode *inode, | |||
| 664 | int err; | 664 | int err; |
| 665 | 665 | ||
| 666 | spin_lock(&sbi->s_inode_lock); | 666 | spin_lock(&sbi->s_inode_lock); |
| 667 | /* Caller of this function MUST lock s_inode_lock */ | ||
| 668 | if (ii->i_bh == NULL) { | 667 | if (ii->i_bh == NULL) { |
| 669 | spin_unlock(&sbi->s_inode_lock); | 668 | spin_unlock(&sbi->s_inode_lock); |
| 670 | err = nilfs_ifile_get_inode_block(sbi->s_ifile, inode->i_ino, | 669 | err = nilfs_ifile_get_inode_block(sbi->s_ifile, inode->i_ino, |
diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c index d24057d58f17..f6af76042d80 100644 --- a/fs/nilfs2/ioctl.c +++ b/fs/nilfs2/ioctl.c | |||
| @@ -99,7 +99,8 @@ static int nilfs_ioctl_wrap_copy(struct the_nilfs *nilfs, | |||
| 99 | static int nilfs_ioctl_change_cpmode(struct inode *inode, struct file *filp, | 99 | static int nilfs_ioctl_change_cpmode(struct inode *inode, struct file *filp, |
| 100 | unsigned int cmd, void __user *argp) | 100 | unsigned int cmd, void __user *argp) |
| 101 | { | 101 | { |
| 102 | struct inode *cpfile = NILFS_SB(inode->i_sb)->s_nilfs->ns_cpfile; | 102 | struct the_nilfs *nilfs = NILFS_SB(inode->i_sb)->s_nilfs; |
| 103 | struct inode *cpfile = nilfs->ns_cpfile; | ||
| 103 | struct nilfs_transaction_info ti; | 104 | struct nilfs_transaction_info ti; |
| 104 | struct nilfs_cpmode cpmode; | 105 | struct nilfs_cpmode cpmode; |
| 105 | int ret; | 106 | int ret; |
| @@ -109,14 +110,17 @@ static int nilfs_ioctl_change_cpmode(struct inode *inode, struct file *filp, | |||
| 109 | if (copy_from_user(&cpmode, argp, sizeof(cpmode))) | 110 | if (copy_from_user(&cpmode, argp, sizeof(cpmode))) |
| 110 | return -EFAULT; | 111 | return -EFAULT; |
| 111 | 112 | ||
| 113 | mutex_lock(&nilfs->ns_mount_mutex); | ||
| 112 | nilfs_transaction_begin(inode->i_sb, &ti, 0); | 114 | nilfs_transaction_begin(inode->i_sb, &ti, 0); |
| 113 | ret = nilfs_cpfile_change_cpmode( | 115 | ret = nilfs_cpfile_change_cpmode( |
| 114 | cpfile, cpmode.cm_cno, cpmode.cm_mode); | 116 | cpfile, cpmode.cm_cno, cpmode.cm_mode); |
| 115 | if (unlikely(ret < 0)) { | 117 | if (unlikely(ret < 0)) { |
| 116 | nilfs_transaction_abort(inode->i_sb); | 118 | nilfs_transaction_abort(inode->i_sb); |
| 119 | mutex_unlock(&nilfs->ns_mount_mutex); | ||
| 117 | return ret; | 120 | return ret; |
| 118 | } | 121 | } |
| 119 | nilfs_transaction_commit(inode->i_sb); /* never fails */ | 122 | nilfs_transaction_commit(inode->i_sb); /* never fails */ |
| 123 | mutex_unlock(&nilfs->ns_mount_mutex); | ||
| 120 | return ret; | 124 | return ret; |
| 121 | } | 125 | } |
| 122 | 126 | ||
diff --git a/fs/proc/array.c b/fs/proc/array.c index 07f77a7945c3..822c2d506518 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c | |||
| @@ -571,7 +571,7 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns, | |||
| 571 | rsslim, | 571 | rsslim, |
| 572 | mm ? mm->start_code : 0, | 572 | mm ? mm->start_code : 0, |
| 573 | mm ? mm->end_code : 0, | 573 | mm ? mm->end_code : 0, |
| 574 | (permitted) ? task->stack_start : 0, | 574 | (permitted && mm) ? task->stack_start : 0, |
| 575 | esp, | 575 | esp, |
| 576 | eip, | 576 | eip, |
| 577 | /* The signal information here is obsolete. | 577 | /* The signal information here is obsolete. |
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 1099395d7d6c..fb17f8226b09 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c | |||
| @@ -1980,7 +1980,7 @@ xlog_recover_do_reg_buffer( | |||
| 1980 | "XFS: NULL dquot in %s.", __func__); | 1980 | "XFS: NULL dquot in %s.", __func__); |
| 1981 | goto next; | 1981 | goto next; |
| 1982 | } | 1982 | } |
| 1983 | if (item->ri_buf[i].i_len < sizeof(xfs_dqblk_t)) { | 1983 | if (item->ri_buf[i].i_len < sizeof(xfs_disk_dquot_t)) { |
| 1984 | cmn_err(CE_ALERT, | 1984 | cmn_err(CE_ALERT, |
| 1985 | "XFS: dquot too small (%d) in %s.", | 1985 | "XFS: dquot too small (%d) in %s.", |
| 1986 | item->ri_buf[i].i_len, __func__); | 1986 | item->ri_buf[i].i_len, __func__); |
| @@ -2635,7 +2635,7 @@ xlog_recover_do_dquot_trans( | |||
| 2635 | "XFS: NULL dquot in %s.", __func__); | 2635 | "XFS: NULL dquot in %s.", __func__); |
| 2636 | return XFS_ERROR(EIO); | 2636 | return XFS_ERROR(EIO); |
| 2637 | } | 2637 | } |
| 2638 | if (item->ri_buf[1].i_len < sizeof(xfs_dqblk_t)) { | 2638 | if (item->ri_buf[1].i_len < sizeof(xfs_disk_dquot_t)) { |
| 2639 | cmn_err(CE_ALERT, | 2639 | cmn_err(CE_ALERT, |
| 2640 | "XFS: dquot too small (%d) in %s.", | 2640 | "XFS: dquot too small (%d) in %s.", |
| 2641 | item->ri_buf[1].i_len, __func__); | 2641 | item->ri_buf[1].i_len, __func__); |
diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c index f31271c30de9..2ffc570679be 100644 --- a/fs/xfs/xfs_trans_ail.c +++ b/fs/xfs/xfs_trans_ail.c | |||
| @@ -467,6 +467,7 @@ xfs_trans_ail_update( | |||
| 467 | { | 467 | { |
| 468 | xfs_log_item_t *dlip = NULL; | 468 | xfs_log_item_t *dlip = NULL; |
| 469 | xfs_log_item_t *mlip; /* ptr to minimum lip */ | 469 | xfs_log_item_t *mlip; /* ptr to minimum lip */ |
| 470 | xfs_lsn_t tail_lsn; | ||
| 470 | 471 | ||
| 471 | mlip = xfs_ail_min(ailp); | 472 | mlip = xfs_ail_min(ailp); |
| 472 | 473 | ||
| @@ -483,8 +484,16 @@ xfs_trans_ail_update( | |||
| 483 | 484 | ||
| 484 | if (mlip == dlip) { | 485 | if (mlip == dlip) { |
| 485 | mlip = xfs_ail_min(ailp); | 486 | mlip = xfs_ail_min(ailp); |
| 487 | /* | ||
| 488 | * It is not safe to access mlip after the AIL lock is | ||
| 489 | * dropped, so we must get a copy of li_lsn before we do | ||
| 490 | * so. This is especially important on 32-bit platforms | ||
| 491 | * where accessing and updating 64-bit values like li_lsn | ||
| 492 | * is not atomic. | ||
| 493 | */ | ||
| 494 | tail_lsn = mlip->li_lsn; | ||
| 486 | spin_unlock(&ailp->xa_lock); | 495 | spin_unlock(&ailp->xa_lock); |
| 487 | xfs_log_move_tail(ailp->xa_mount, mlip->li_lsn); | 496 | xfs_log_move_tail(ailp->xa_mount, tail_lsn); |
| 488 | } else { | 497 | } else { |
| 489 | spin_unlock(&ailp->xa_lock); | 498 | spin_unlock(&ailp->xa_lock); |
| 490 | } | 499 | } |
| @@ -514,6 +523,7 @@ xfs_trans_ail_delete( | |||
| 514 | { | 523 | { |
| 515 | xfs_log_item_t *dlip; | 524 | xfs_log_item_t *dlip; |
| 516 | xfs_log_item_t *mlip; | 525 | xfs_log_item_t *mlip; |
| 526 | xfs_lsn_t tail_lsn; | ||
| 517 | 527 | ||
| 518 | if (lip->li_flags & XFS_LI_IN_AIL) { | 528 | if (lip->li_flags & XFS_LI_IN_AIL) { |
| 519 | mlip = xfs_ail_min(ailp); | 529 | mlip = xfs_ail_min(ailp); |
| @@ -527,9 +537,16 @@ xfs_trans_ail_delete( | |||
| 527 | 537 | ||
| 528 | if (mlip == dlip) { | 538 | if (mlip == dlip) { |
| 529 | mlip = xfs_ail_min(ailp); | 539 | mlip = xfs_ail_min(ailp); |
| 540 | /* | ||
| 541 | * It is not safe to access mlip after the AIL lock | ||
| 542 | * is dropped, so we must get a copy of li_lsn | ||
| 543 | * before we do so. This is especially important | ||
| 544 | * on 32-bit platforms where accessing and updating | ||
| 545 | * 64-bit values like li_lsn is not atomic. | ||
| 546 | */ | ||
| 547 | tail_lsn = mlip ? mlip->li_lsn : 0; | ||
| 530 | spin_unlock(&ailp->xa_lock); | 548 | spin_unlock(&ailp->xa_lock); |
| 531 | xfs_log_move_tail(ailp->xa_mount, | 549 | xfs_log_move_tail(ailp->xa_mount, tail_lsn); |
| 532 | (mlip ? mlip->li_lsn : 0)); | ||
| 533 | } else { | 550 | } else { |
| 534 | spin_unlock(&ailp->xa_lock); | 551 | spin_unlock(&ailp->xa_lock); |
| 535 | } | 552 | } |
