diff options
author | Steve French <sfrench@us.ibm.com> | 2010-04-27 00:38:15 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-04-27 00:38:15 -0400 |
commit | d54ff73259a852d4b3886dc586587fdef5e9c8de (patch) | |
tree | 417ed0f9b87e4187641b053892eeb8f32ec32746 /fs/cifs/cifsfs.c | |
parent | 9bf67e516f16d31f86aa6f063576a959bbf19990 (diff) |
[CIFS] Fix lease break for writes
On lease break we were breaking to readonly leases always
even if write requested. Also removed experimental
ifdef around setlease code
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r-- | fs/cifs/cifsfs.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 440e98ca01e3..80a93562b47a 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -645,7 +645,6 @@ static loff_t cifs_llseek(struct file *file, loff_t offset, int origin) | |||
645 | return generic_file_llseek_unlocked(file, offset, origin); | 645 | return generic_file_llseek_unlocked(file, offset, origin); |
646 | } | 646 | } |
647 | 647 | ||
648 | #ifdef CONFIG_CIFS_EXPERIMENTAL | ||
649 | static int cifs_setlease(struct file *file, long arg, struct file_lock **lease) | 648 | static int cifs_setlease(struct file *file, long arg, struct file_lock **lease) |
650 | { | 649 | { |
651 | /* note that this is called by vfs setlease with the BKL held | 650 | /* note that this is called by vfs setlease with the BKL held |
@@ -674,7 +673,6 @@ static int cifs_setlease(struct file *file, long arg, struct file_lock **lease) | |||
674 | else | 673 | else |
675 | return -EAGAIN; | 674 | return -EAGAIN; |
676 | } | 675 | } |
677 | #endif | ||
678 | 676 | ||
679 | struct file_system_type cifs_fs_type = { | 677 | struct file_system_type cifs_fs_type = { |
680 | .owner = THIS_MODULE, | 678 | .owner = THIS_MODULE, |
@@ -751,10 +749,7 @@ const struct file_operations cifs_file_ops = { | |||
751 | #ifdef CONFIG_CIFS_POSIX | 749 | #ifdef CONFIG_CIFS_POSIX |
752 | .unlocked_ioctl = cifs_ioctl, | 750 | .unlocked_ioctl = cifs_ioctl, |
753 | #endif /* CONFIG_CIFS_POSIX */ | 751 | #endif /* CONFIG_CIFS_POSIX */ |
754 | |||
755 | #ifdef CONFIG_CIFS_EXPERIMENTAL | ||
756 | .setlease = cifs_setlease, | 752 | .setlease = cifs_setlease, |
757 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ | ||
758 | }; | 753 | }; |
759 | 754 | ||
760 | const struct file_operations cifs_file_direct_ops = { | 755 | const struct file_operations cifs_file_direct_ops = { |
@@ -773,9 +768,7 @@ const struct file_operations cifs_file_direct_ops = { | |||
773 | .unlocked_ioctl = cifs_ioctl, | 768 | .unlocked_ioctl = cifs_ioctl, |
774 | #endif /* CONFIG_CIFS_POSIX */ | 769 | #endif /* CONFIG_CIFS_POSIX */ |
775 | .llseek = cifs_llseek, | 770 | .llseek = cifs_llseek, |
776 | #ifdef CONFIG_CIFS_EXPERIMENTAL | ||
777 | .setlease = cifs_setlease, | 771 | .setlease = cifs_setlease, |
778 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ | ||
779 | }; | 772 | }; |
780 | const struct file_operations cifs_file_nobrl_ops = { | 773 | const struct file_operations cifs_file_nobrl_ops = { |
781 | .read = do_sync_read, | 774 | .read = do_sync_read, |
@@ -792,10 +785,7 @@ const struct file_operations cifs_file_nobrl_ops = { | |||
792 | #ifdef CONFIG_CIFS_POSIX | 785 | #ifdef CONFIG_CIFS_POSIX |
793 | .unlocked_ioctl = cifs_ioctl, | 786 | .unlocked_ioctl = cifs_ioctl, |
794 | #endif /* CONFIG_CIFS_POSIX */ | 787 | #endif /* CONFIG_CIFS_POSIX */ |
795 | |||
796 | #ifdef CONFIG_CIFS_EXPERIMENTAL | ||
797 | .setlease = cifs_setlease, | 788 | .setlease = cifs_setlease, |
798 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ | ||
799 | }; | 789 | }; |
800 | 790 | ||
801 | const struct file_operations cifs_file_direct_nobrl_ops = { | 791 | const struct file_operations cifs_file_direct_nobrl_ops = { |
@@ -813,9 +803,7 @@ const struct file_operations cifs_file_direct_nobrl_ops = { | |||
813 | .unlocked_ioctl = cifs_ioctl, | 803 | .unlocked_ioctl = cifs_ioctl, |
814 | #endif /* CONFIG_CIFS_POSIX */ | 804 | #endif /* CONFIG_CIFS_POSIX */ |
815 | .llseek = cifs_llseek, | 805 | .llseek = cifs_llseek, |
816 | #ifdef CONFIG_CIFS_EXPERIMENTAL | ||
817 | .setlease = cifs_setlease, | 806 | .setlease = cifs_setlease, |
818 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ | ||
819 | }; | 807 | }; |
820 | 808 | ||
821 | const struct file_operations cifs_dir_ops = { | 809 | const struct file_operations cifs_dir_ops = { |