diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/Kconfig | 10 | ||||
-rw-r--r-- | fs/bpkfs.c | 4 | ||||
-rw-r--r-- | fs/ramfs.c | 12 |
3 files changed, 9 insertions, 17 deletions
diff --git a/fs/Kconfig b/fs/Kconfig index 76a3846929..e3a95321c7 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -25,7 +25,7 @@ config FS_CRAMFS select ZLIB prompt "cramfs support" -source fs/ext4/Kconfig +source "fs/ext4/Kconfig" config FS_RAMFS bool @@ -70,8 +70,8 @@ config FS_EFIVARFS help This filesystem driver provides access to EFI variables. -source fs/fat/Kconfig -source fs/ubifs/Kconfig +source "fs/fat/Kconfig" +source "fs/ubifs/Kconfig" config FS_BPKFS bool @@ -106,8 +106,8 @@ config FS_SMHFS located on a debugging host connected to the target running Barebox -source fs/pstore/Kconfig -source fs/squashfs/Kconfig +source "fs/pstore/Kconfig" +source "fs/squashfs/Kconfig" config FS_RATP bool diff --git a/fs/bpkfs.c b/fs/bpkfs.c index 655cde09b7..90d3a6bf1b 100644 --- a/fs/bpkfs.c +++ b/fs/bpkfs.c @@ -455,9 +455,9 @@ static int bpkfs_probe(struct device_d *dev) list_add_tail(&d->list, &h->list_data); priv->nb_data_entries++; - ret = lseek(fd, d->size, SEEK_CUR); - if (ret < 0) { + if (lseek(fd, d->size, SEEK_CUR) != d->size) { dev_err(dev, "could not seek: %s\n", errno_str()); + ret = -errno; goto err; } diff --git a/fs/ramfs.c b/fs/ramfs.c index 3046afef3b..7e7dc7aca9 100644 --- a/fs/ramfs.c +++ b/fs/ramfs.c @@ -43,8 +43,6 @@ struct ramfs_inode { char *symlink; ulong mode; - struct handle_d *handle; - ulong size; struct ramfs_chunk *data; @@ -101,8 +99,6 @@ static struct inode *ramfs_get_inode(struct super_block *sb, const struct inode return inode; } -static int chunks = 0; - static struct ramfs_chunk *ramfs_get_chunk(void) { struct ramfs_chunk *data = malloc(sizeof(struct ramfs_chunk)); @@ -115,7 +111,6 @@ static struct ramfs_chunk *ramfs_get_chunk(void) return NULL; } data->next = NULL; - chunks++; return data; } @@ -124,7 +119,6 @@ static void ramfs_put_chunk(struct ramfs_chunk *data) { free(data->data); free(data); - chunks--; } /* ---------------------------------------------------------------*/ @@ -137,10 +131,8 @@ ramfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode) if (!inode) return -ENOSPC; - if (inode) { - d_instantiate(dentry, inode); - dget(dentry); /* Extra count - pin the dentry in core */ - } + d_instantiate(dentry, inode); + dget(dentry); /* Extra count - pin the dentry in core */ return 0; } |