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-Url: https://git.stricted.de/?a=commitdiff_plain;h=55aa2e097dd5f0546972fc2607d7094181967ce2;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [[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 5e59723c02bd..e2b4ce1dad66 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; }