aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ufs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ufs')
-rw-r--r--fs/ufs/dir.c2
-rw-r--r--fs/ufs/file.c2
-rw-r--r--fs/ufs/super.c2
-rw-r--r--fs/ufs/truncate.c10
-rw-r--r--fs/ufs/ufs_fs.h1
5 files changed, 9 insertions, 8 deletions
diff --git a/fs/ufs/dir.c b/fs/ufs/dir.c
index 317a0d444f6b..ec784756dc65 100644
--- a/fs/ufs/dir.c
+++ b/fs/ufs/dir.c
@@ -666,6 +666,6 @@ not_empty:
666const struct file_operations ufs_dir_operations = { 666const struct file_operations ufs_dir_operations = {
667 .read = generic_read_dir, 667 .read = generic_read_dir,
668 .readdir = ufs_readdir, 668 .readdir = ufs_readdir,
669 .fsync = simple_fsync, 669 .fsync = generic_file_fsync,
670 .llseek = generic_file_llseek, 670 .llseek = generic_file_llseek,
671}; 671};
diff --git a/fs/ufs/file.c b/fs/ufs/file.c
index 73655c61240a..33afa20d4509 100644
--- a/fs/ufs/file.c
+++ b/fs/ufs/file.c
@@ -41,6 +41,6 @@ const struct file_operations ufs_file_operations = {
41 .aio_write = generic_file_aio_write, 41 .aio_write = generic_file_aio_write,
42 .mmap = generic_file_mmap, 42 .mmap = generic_file_mmap,
43 .open = generic_file_open, 43 .open = generic_file_open,
44 .fsync = simple_fsync, 44 .fsync = generic_file_fsync,
45 .splice_read = generic_file_splice_read, 45 .splice_read = generic_file_splice_read,
46}; 46};
diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index 3c9bbf23c2ff..3ec5a9eb6efb 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -917,6 +917,7 @@ again:
917 sbi->s_bytesex = BYTESEX_LE; 917 sbi->s_bytesex = BYTESEX_LE;
918 switch ((uspi->fs_magic = fs32_to_cpu(sb, usb3->fs_magic))) { 918 switch ((uspi->fs_magic = fs32_to_cpu(sb, usb3->fs_magic))) {
919 case UFS_MAGIC: 919 case UFS_MAGIC:
920 case UFS_MAGIC_BW:
920 case UFS2_MAGIC: 921 case UFS2_MAGIC:
921 case UFS_MAGIC_LFN: 922 case UFS_MAGIC_LFN:
922 case UFS_MAGIC_FEA: 923 case UFS_MAGIC_FEA:
@@ -926,6 +927,7 @@ again:
926 sbi->s_bytesex = BYTESEX_BE; 927 sbi->s_bytesex = BYTESEX_BE;
927 switch ((uspi->fs_magic = fs32_to_cpu(sb, usb3->fs_magic))) { 928 switch ((uspi->fs_magic = fs32_to_cpu(sb, usb3->fs_magic))) {
928 case UFS_MAGIC: 929 case UFS_MAGIC:
930 case UFS_MAGIC_BW:
929 case UFS2_MAGIC: 931 case UFS2_MAGIC:
930 case UFS_MAGIC_LFN: 932 case UFS_MAGIC_LFN:
931 case UFS_MAGIC_FEA: 933 case UFS_MAGIC_FEA:
diff --git a/fs/ufs/truncate.c b/fs/ufs/truncate.c
index 4171e2df18dd..589e01a465ba 100644
--- a/fs/ufs/truncate.c
+++ b/fs/ufs/truncate.c
@@ -500,12 +500,10 @@ out:
500 return err; 500 return err;
501} 501}
502 502
503
504/* 503/*
505 * We don't define our `inode->i_op->truncate', and call it here, 504 * TODO:
506 * because of: 505 * - truncate case should use proper ordering instead of using
507 * - there is no way to know old size 506 * simple_setsize
508 * - there is no way inform user about error, if it happens in `truncate'
509 */ 507 */
510int ufs_setattr(struct dentry *dentry, struct iattr *attr) 508int ufs_setattr(struct dentry *dentry, struct iattr *attr)
511{ 509{
@@ -520,7 +518,7 @@ int ufs_setattr(struct dentry *dentry, struct iattr *attr)
520 if (ia_valid & ATTR_SIZE && attr->ia_size != inode->i_size) { 518 if (ia_valid & ATTR_SIZE && attr->ia_size != inode->i_size) {
521 loff_t old_i_size = inode->i_size; 519 loff_t old_i_size = inode->i_size;
522 520
523 error = vmtruncate(inode, attr->ia_size); 521 error = simple_setsize(inode, attr->ia_size);
524 if (error) 522 if (error)
525 return error; 523 return error;
526 error = ufs_truncate(inode, old_i_size); 524 error = ufs_truncate(inode, old_i_size);
diff --git a/fs/ufs/ufs_fs.h b/fs/ufs/ufs_fs.h
index 6943ec677c0b..8aba544f9fad 100644
--- a/fs/ufs/ufs_fs.h
+++ b/fs/ufs/ufs_fs.h
@@ -48,6 +48,7 @@ typedef __u16 __bitwise __fs16;
48#define UFS_SECTOR_SIZE 512 48#define UFS_SECTOR_SIZE 512
49#define UFS_SECTOR_BITS 9 49#define UFS_SECTOR_BITS 9
50#define UFS_MAGIC 0x00011954 50#define UFS_MAGIC 0x00011954
51#define UFS_MAGIC_BW 0x0f242697
51#define UFS2_MAGIC 0x19540119 52#define UFS2_MAGIC 0x19540119
52#define UFS_CIGAM 0x54190100 /* byteswapped MAGIC */ 53#define UFS_CIGAM 0x54190100 /* byteswapped MAGIC */
53 54