Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2:
nilfs2: deleted inconsistent comment in nilfs_load_inode_block()
nilfs2: deleted struct nilfs_dat_group_desc
nilfs2: fix lock order reversal in chcp operation

+5 -13
-2
fs/nilfs2/cpfile.c
··· 871 871 * exclusive with a new mount job. Though it doesn't cover 872 872 * umount, it's enough for the purpose. 873 873 */ 874 - mutex_lock(&nilfs->ns_mount_mutex); 875 874 if (nilfs_checkpoint_is_mounted(nilfs, cno, 1)) { 876 875 /* Current implementation does not have to protect 877 876 plain read-only mounts since they are exclusive ··· 879 880 ret = -EBUSY; 880 881 } else 881 882 ret = nilfs_cpfile_clear_snapshot(cpfile, cno); 882 - mutex_unlock(&nilfs->ns_mount_mutex); 883 883 return ret; 884 884 case NILFS_SNAPSHOT: 885 885 return nilfs_cpfile_set_snapshot(cpfile, cno);
-1
fs/nilfs2/inode.c
··· 664 664 int err; 665 665 666 666 spin_lock(&sbi->s_inode_lock); 667 - /* Caller of this function MUST lock s_inode_lock */ 668 667 if (ii->i_bh == NULL) { 669 668 spin_unlock(&sbi->s_inode_lock); 670 669 err = nilfs_ifile_get_inode_block(sbi->s_ifile, inode->i_ino,
+5 -1
fs/nilfs2/ioctl.c
··· 99 99 static int nilfs_ioctl_change_cpmode(struct inode *inode, struct file *filp, 100 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 104 struct nilfs_transaction_info ti; 104 105 struct nilfs_cpmode cpmode; 105 106 int ret; ··· 110 109 if (copy_from_user(&cpmode, argp, sizeof(cpmode))) 111 110 return -EFAULT; 112 111 112 + mutex_lock(&nilfs->ns_mount_mutex); 113 113 nilfs_transaction_begin(inode->i_sb, &ti, 0); 114 114 ret = nilfs_cpfile_change_cpmode( 115 115 cpfile, cpmode.cm_cno, cpmode.cm_mode); 116 116 if (unlikely(ret < 0)) { 117 117 nilfs_transaction_abort(inode->i_sb); 118 + mutex_unlock(&nilfs->ns_mount_mutex); 118 119 return ret; 119 120 } 120 121 nilfs_transaction_commit(inode->i_sb); /* never fails */ 122 + mutex_unlock(&nilfs->ns_mount_mutex); 121 123 return ret; 122 124 } 123 125
-9
include/linux/nilfs2_fs.h
··· 425 425 }; 426 426 427 427 /** 428 - * struct nilfs_dat_group_desc - block group descriptor 429 - * @dg_nfrees: number of free virtual block numbers in block group 430 - */ 431 - struct nilfs_dat_group_desc { 432 - __le32 dg_nfrees; 433 - }; 434 - 435 - 436 - /** 437 428 * struct nilfs_snapshot_list - snapshot list 438 429 * @ssl_next: next checkpoint number on snapshot list 439 430 * @ssl_prev: previous checkpoint number on snapshot list