pvfs_setfileinfo: break level2 oplocks on setfileinfo() ALLOCATION_INFO and END_OF_FI...
authorStefan Metzmacher <metze@samba.org>
Sat, 23 Feb 2008 10:46:43 +0000 (11:46 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 26 Feb 2008 08:32:59 +0000 (09:32 +0100)
metze

source/ntvfs/posix/pvfs_setfileinfo.c

index c6d014a72f6dc14299a0a302a0c485b56f4d725a..d1d8f819ef894829438b888d12c7b4d1ef79d736 100644 (file)
@@ -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;