diff options
author | Steve French <sfrench@us.ibm.com> | 2006-05-30 18:09:31 +0000 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2006-05-30 18:09:31 +0000 |
commit | 55aa2e097dd5f0546972fc2607d7094181967ce2 (patch) | |
tree | 4825ebb4cd4a1aa3d6d264c02ac8fe25d9598aea /fs | |
parent | 08775834c412c48f3539ef7ed073fff58e3cf419 (diff) | |
download | op-kernel-dev-55aa2e097dd5f0546972fc2607d7094181967ce2.zip op-kernel-dev-55aa2e097dd5f0546972fc2607d7094181967ce2.tar.gz |
[[CIFS] Pass truncate open flag through on file open in case setattr fails
on set size to zero.
Signed-off-by: Sebastian Voitzsch <sebastoam/vpotzscj@web.de>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/file.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 5e59723..e2b4ce1 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; } |