提交 55aa2e09 编写于 作者: S Steve French

[[CIFS] Pass truncate open flag through on file open in case setattr fails

on set size to zero.
Signed-off-by: NSebastian Voitzsch <sebastoam/vpotzscj@web.de>
Signed-off-by: NSteve French <sfrench@us.ibm.com>
上级 08775834
...@@ -84,6 +84,8 @@ static inline int cifs_get_disposition(unsigned int flags) ...@@ -84,6 +84,8 @@ static inline int cifs_get_disposition(unsigned int flags)
return FILE_OVERWRITE_IF; return FILE_OVERWRITE_IF;
else if ((flags & O_CREAT) == O_CREAT) else if ((flags & O_CREAT) == O_CREAT)
return FILE_OPEN_IF; return FILE_OPEN_IF;
else if ((flags & O_TRUNC) == O_TRUNC)
return FILE_OVERWRITE;
else else
return FILE_OPEN; return FILE_OPEN;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册