summaryrefslogtreecommitdiff
path: root/fs/nilfs2/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nilfs2/dir.c')
-rw-r--r--fs/nilfs2/dir.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c
index 9b7f8e9655a2..3653db5cdb65 100644
--- a/fs/nilfs2/dir.c
+++ b/fs/nilfs2/dir.c
@@ -30,6 +30,7 @@
*/
#include <linux/pagemap.h>
+#include <linux/filelock.h>
#include "nilfs.h"
#include "page.h"
@@ -96,7 +97,7 @@ static void nilfs_commit_chunk(struct folio *folio,
int err;
nr_dirty = nilfs_page_count_clean_buffers(folio, from, to);
- copied = block_write_end(NULL, mapping, pos, len, len, folio, NULL);
+ copied = block_write_end(pos, len, len, folio);
if (pos + copied > dir->i_size)
i_size_write(dir, pos + copied);
if (IS_DIRSYNC(dir))
@@ -149,7 +150,7 @@ out:
Ebadsize:
nilfs_error(sb,
- "size of directory #%lu is not a multiple of chunk size",
+ "size of directory #%llu is not a multiple of chunk size",
dir->i_ino);
goto fail;
Eshort:
@@ -168,7 +169,7 @@ Einumber:
error = "disallowed inode number";
bad_entry:
nilfs_error(sb,
- "bad entry in directory #%lu: %s - offset=%lu, inode=%lu, rec_len=%zd, name_len=%d",
+ "bad entry in directory #%llu: %s - offset=%lu, inode=%lu, rec_len=%zd, name_len=%d",
dir->i_ino, error, (folio->index << PAGE_SHIFT) + offs,
(unsigned long)le64_to_cpu(p->inode),
rec_len, p->name_len);
@@ -176,7 +177,7 @@ bad_entry:
Eend:
p = (struct nilfs_dir_entry *)(kaddr + offs);
nilfs_error(sb,
- "entry in directory #%lu spans the page boundary offset=%lu, inode=%lu",
+ "entry in directory #%llu spans the page boundary offset=%lu, inode=%lu",
dir->i_ino, (folio->index << PAGE_SHIFT) + offs,
(unsigned long)le64_to_cpu(p->inode));
fail:
@@ -250,7 +251,7 @@ static int nilfs_readdir(struct file *file, struct dir_context *ctx)
kaddr = nilfs_get_folio(inode, n, &folio);
if (IS_ERR(kaddr)) {
- nilfs_error(sb, "bad page in #%lu", inode->i_ino);
+ nilfs_error(sb, "bad page in #%llu", inode->i_ino);
ctx->pos += PAGE_SIZE - offset;
return -EIO;
}
@@ -335,7 +336,7 @@ struct nilfs_dir_entry *nilfs_find_entry(struct inode *dir,
/* next folio is past the blocks we've got */
if (unlikely(n > (dir->i_blocks >> (PAGE_SHIFT - 9)))) {
nilfs_error(dir->i_sb,
- "dir %lu size %lld exceeds block count %llu",
+ "dir %llu size %lld exceeds block count %llu",
dir->i_ino, dir->i_size,
(unsigned long long)dir->i_blocks);
goto out;
@@ -381,7 +382,7 @@ struct nilfs_dir_entry *nilfs_dotdot(struct inode *dir, struct folio **foliop)
return next_de;
fail:
- nilfs_error(dir->i_sb, "directory #%lu %s", dir->i_ino, msg);
+ nilfs_error(dir->i_sb, "directory #%llu %s", dir->i_ino, msg);
folio_release_kmap(folio, de);
return NULL;
}
@@ -661,5 +662,5 @@ const struct file_operations nilfs_dir_operations = {
.compat_ioctl = nilfs_compat_ioctl,
#endif /* CONFIG_COMPAT */
.fsync = nilfs_sync_file,
-
+ .setlease = generic_setlease,
};