diff options
Diffstat (limited to 'fs/gfs2/ops_file.c')
-rw-r--r-- | fs/gfs2/ops_file.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c index 70b9b8548945..5d82e91887e3 100644 --- a/fs/gfs2/ops_file.c +++ b/fs/gfs2/ops_file.c | |||
@@ -413,7 +413,9 @@ out_unlock: | |||
413 | gfs2_glock_dq(&gh); | 413 | gfs2_glock_dq(&gh); |
414 | out: | 414 | out: |
415 | gfs2_holder_uninit(&gh); | 415 | gfs2_holder_uninit(&gh); |
416 | if (ret) | 416 | if (ret == -ENOMEM) |
417 | ret = VM_FAULT_OOM; | ||
418 | else if (ret) | ||
417 | ret = VM_FAULT_SIGBUS; | 419 | ret = VM_FAULT_SIGBUS; |
418 | return ret; | 420 | return ret; |
419 | } | 421 | } |
@@ -705,7 +707,7 @@ static int gfs2_flock(struct file *file, int cmd, struct file_lock *fl) | |||
705 | } | 707 | } |
706 | } | 708 | } |
707 | 709 | ||
708 | const struct file_operations *gfs2_file_fops = &(const struct file_operations){ | 710 | const struct file_operations gfs2_file_fops = { |
709 | .llseek = gfs2_llseek, | 711 | .llseek = gfs2_llseek, |
710 | .read = do_sync_read, | 712 | .read = do_sync_read, |
711 | .aio_read = generic_file_aio_read, | 713 | .aio_read = generic_file_aio_read, |
@@ -723,7 +725,7 @@ const struct file_operations *gfs2_file_fops = &(const struct file_operations){ | |||
723 | .setlease = gfs2_setlease, | 725 | .setlease = gfs2_setlease, |
724 | }; | 726 | }; |
725 | 727 | ||
726 | const struct file_operations *gfs2_dir_fops = &(const struct file_operations){ | 728 | const struct file_operations gfs2_dir_fops = { |
727 | .readdir = gfs2_readdir, | 729 | .readdir = gfs2_readdir, |
728 | .unlocked_ioctl = gfs2_ioctl, | 730 | .unlocked_ioctl = gfs2_ioctl, |
729 | .open = gfs2_open, | 731 | .open = gfs2_open, |
@@ -735,7 +737,7 @@ const struct file_operations *gfs2_dir_fops = &(const struct file_operations){ | |||
735 | 737 | ||
736 | #endif /* CONFIG_GFS2_FS_LOCKING_DLM */ | 738 | #endif /* CONFIG_GFS2_FS_LOCKING_DLM */ |
737 | 739 | ||
738 | const struct file_operations *gfs2_file_fops_nolock = &(const struct file_operations){ | 740 | const struct file_operations gfs2_file_fops_nolock = { |
739 | .llseek = gfs2_llseek, | 741 | .llseek = gfs2_llseek, |
740 | .read = do_sync_read, | 742 | .read = do_sync_read, |
741 | .aio_read = generic_file_aio_read, | 743 | .aio_read = generic_file_aio_read, |
@@ -751,7 +753,7 @@ const struct file_operations *gfs2_file_fops_nolock = &(const struct file_operat | |||
751 | .setlease = generic_setlease, | 753 | .setlease = generic_setlease, |
752 | }; | 754 | }; |
753 | 755 | ||
754 | const struct file_operations *gfs2_dir_fops_nolock = &(const struct file_operations){ | 756 | const struct file_operations gfs2_dir_fops_nolock = { |
755 | .readdir = gfs2_readdir, | 757 | .readdir = gfs2_readdir, |
756 | .unlocked_ioctl = gfs2_ioctl, | 758 | .unlocked_ioctl = gfs2_ioctl, |
757 | .open = gfs2_open, | 759 | .open = gfs2_open, |