From: Steve French Date: Tue, 30 May 2006 18:09:31 +0000 (+0000) Subject: [[CIFS] Pass truncate open flag through on file open in case setattr fails X-Git-Tag: v2.6.17-rc6~84^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=55aa2e097dd5f0546972fc2607d7094181967ce2;p=linux-2.6 [[CIFS] Pass truncate open flag through on file open in case setattr fails on set size to zero. Signed-off-by: Sebastian Voitzsch Signed-off-by: Steve French --- diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 5e59723c02..e2b4ce1dad 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -84,6 +84,8 @@ static inline int cifs_get_disposition(unsigned int flags) return FILE_OVERWRITE_IF; else if ((flags & O_CREAT) == O_CREAT) return FILE_OPEN_IF; + else if ((flags & O_TRUNC) == O_TRUNC) + return FILE_OVERWRITE; else return FILE_OPEN; }