diff options
Diffstat (limited to 'fs/ubifs/super.c')
-rw-r--r-- | fs/ubifs/super.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 333e181ee987..4d2f2157dd3f 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c | |||
@@ -283,7 +283,7 @@ static void ubifs_destroy_inode(struct inode *inode) | |||
283 | /* | 283 | /* |
284 | * Note, Linux write-back code calls this without 'i_mutex'. | 284 | * Note, Linux write-back code calls this without 'i_mutex'. |
285 | */ | 285 | */ |
286 | static int ubifs_write_inode(struct inode *inode, int wait) | 286 | static int ubifs_write_inode(struct inode *inode, struct writeback_control *wbc) |
287 | { | 287 | { |
288 | int err = 0; | 288 | int err = 0; |
289 | struct ubifs_info *c = inode->i_sb->s_fs_info; | 289 | struct ubifs_info *c = inode->i_sb->s_fs_info; |
@@ -1393,12 +1393,7 @@ static int mount_ubifs(struct ubifs_info *c) | |||
1393 | c->leb_size, c->leb_size >> 10); | 1393 | c->leb_size, c->leb_size >> 10); |
1394 | dbg_msg("data journal heads: %d", | 1394 | dbg_msg("data journal heads: %d", |
1395 | c->jhead_cnt - NONDATA_JHEADS_CNT); | 1395 | c->jhead_cnt - NONDATA_JHEADS_CNT); |
1396 | dbg_msg("UUID: %02X%02X%02X%02X-%02X%02X" | 1396 | dbg_msg("UUID: %pUB", c->uuid); |
1397 | "-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X", | ||
1398 | c->uuid[0], c->uuid[1], c->uuid[2], c->uuid[3], | ||
1399 | c->uuid[4], c->uuid[5], c->uuid[6], c->uuid[7], | ||
1400 | c->uuid[8], c->uuid[9], c->uuid[10], c->uuid[11], | ||
1401 | c->uuid[12], c->uuid[13], c->uuid[14], c->uuid[15]); | ||
1402 | dbg_msg("big_lpt %d", c->big_lpt); | 1397 | dbg_msg("big_lpt %d", c->big_lpt); |
1403 | dbg_msg("log LEBs: %d (%d - %d)", | 1398 | dbg_msg("log LEBs: %d (%d - %d)", |
1404 | c->log_lebs, UBIFS_LOG_LNUM, c->log_last); | 1399 | c->log_lebs, UBIFS_LOG_LNUM, c->log_last); |
@@ -1842,22 +1837,32 @@ const struct super_operations ubifs_super_operations = { | |||
1842 | * @name: UBI volume name | 1837 | * @name: UBI volume name |
1843 | * @mode: UBI volume open mode | 1838 | * @mode: UBI volume open mode |
1844 | * | 1839 | * |
1845 | * There are several ways to specify UBI volumes when mounting UBIFS: | 1840 | * The primary method of mounting UBIFS is by specifying the UBI volume |
1846 | * o ubiX_Y - UBI device number X, volume Y; | 1841 | * character device node path. However, UBIFS may also be mounted withoug any |
1847 | * o ubiY - UBI device number 0, volume Y; | 1842 | * character device node using one of the following methods: |
1843 | * | ||
1844 | * o ubiX_Y - mount UBI device number X, volume Y; | ||
1845 | * o ubiY - mount UBI device number 0, volume Y; | ||
1848 | * o ubiX:NAME - mount UBI device X, volume with name NAME; | 1846 | * o ubiX:NAME - mount UBI device X, volume with name NAME; |
1849 | * o ubi:NAME - mount UBI device 0, volume with name NAME. | 1847 | * o ubi:NAME - mount UBI device 0, volume with name NAME. |
1850 | * | 1848 | * |
1851 | * Alternative '!' separator may be used instead of ':' (because some shells | 1849 | * Alternative '!' separator may be used instead of ':' (because some shells |
1852 | * like busybox may interpret ':' as an NFS host name separator). This function | 1850 | * like busybox may interpret ':' as an NFS host name separator). This function |
1853 | * returns ubi volume object in case of success and a negative error code in | 1851 | * returns UBI volume description object in case of success and a negative |
1854 | * case of failure. | 1852 | * error code in case of failure. |
1855 | */ | 1853 | */ |
1856 | static struct ubi_volume_desc *open_ubi(const char *name, int mode) | 1854 | static struct ubi_volume_desc *open_ubi(const char *name, int mode) |
1857 | { | 1855 | { |
1856 | struct ubi_volume_desc *ubi; | ||
1858 | int dev, vol; | 1857 | int dev, vol; |
1859 | char *endptr; | 1858 | char *endptr; |
1860 | 1859 | ||
1860 | /* First, try to open using the device node path method */ | ||
1861 | ubi = ubi_open_volume_path(name, mode); | ||
1862 | if (!IS_ERR(ubi)) | ||
1863 | return ubi; | ||
1864 | |||
1865 | /* Try the "nodev" method */ | ||
1861 | if (name[0] != 'u' || name[1] != 'b' || name[2] != 'i') | 1866 | if (name[0] != 'u' || name[1] != 'b' || name[2] != 'i') |
1862 | return ERR_PTR(-EINVAL); | 1867 | return ERR_PTR(-EINVAL); |
1863 | 1868 | ||