summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-02-23 11:46:43 +0100
committerStefan Metzmacher <metze@samba.org>2008-02-26 09:32:59 +0100
commitee81b7a85e8bb749a00c85bfdcf8f1e341ad2eea (patch)
tree5a75bbce5e9c99e8636ca4a38ec7056caebbc0c7 /source4
parent4344ac6209df4be2dad6a8b1c0766101f5972f13 (diff)
downloadsamba-ee81b7a85e8bb749a00c85bfdcf8f1e341ad2eea.tar.gz
samba-ee81b7a85e8bb749a00c85bfdcf8f1e341ad2eea.tar.bz2
samba-ee81b7a85e8bb749a00c85bfdcf8f1e341ad2eea.zip
pvfs_setfileinfo: break level2 oplocks on setfileinfo() ALLOCATION_INFO and END_OF_FILE_INFO
metze (This used to be commit b258f9d8d4bf3606f4884d1bff548f16dadc08aa)
Diffstat (limited to 'source4')
-rw-r--r--source4/ntvfs/posix/pvfs_setfileinfo.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/ntvfs/posix/pvfs_setfileinfo.c b/source4/ntvfs/posix/pvfs_setfileinfo.c
index c6d014a72f..d1d8f819ef 100644
--- a/source4/ntvfs/posix/pvfs_setfileinfo.c
+++ b/source4/ntvfs/posix/pvfs_setfileinfo.c
@@ -355,6 +355,9 @@ NTSTATUS pvfs_setfileinfo(struct ntvfs_module_context *ntvfs,
case RAW_SFILEINFO_ALLOCATION_INFO:
case RAW_SFILEINFO_ALLOCATION_INFORMATION:
+ status = pvfs_break_level2_oplocks(f);
+ NT_STATUS_NOT_OK_RETURN(status);
+
newstats.dos.alloc_size = info->allocation_info.in.alloc_size;
if (newstats.dos.alloc_size < newstats.st.st_size) {
newstats.st.st_size = newstats.dos.alloc_size;
@@ -365,6 +368,9 @@ NTSTATUS pvfs_setfileinfo(struct ntvfs_module_context *ntvfs,
case RAW_SFILEINFO_END_OF_FILE_INFO:
case RAW_SFILEINFO_END_OF_FILE_INFORMATION:
+ status = pvfs_break_level2_oplocks(f);
+ NT_STATUS_NOT_OK_RETURN(status);
+
newstats.st.st_size = info->end_of_file_info.in.size;
break;