diff options
author | Steve French <sfrench@us.ibm.com> | 2009-02-23 20:43:11 +0000 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2009-03-12 01:36:20 +0000 |
commit | 7fc8f4e95bf9564045985bb206af8e28a5e4e28f (patch) | |
tree | e2a7229e18132fe86c66bb3e06436e537dd28535 /fs/cifs/dir.c | |
parent | be652445fdccb8e5d4391928c3b45324ea37f9e1 (diff) | |
download | kernel_samsung_smdk4412-7fc8f4e95bf9564045985bb206af8e28a5e4e28f.zip kernel_samsung_smdk4412-7fc8f4e95bf9564045985bb206af8e28a5e4e28f.tar.gz kernel_samsung_smdk4412-7fc8f4e95bf9564045985bb206af8e28a5e4e28f.tar.bz2 |
[CIFS] reopen file via newer posix open protocol operation if available
If the network connection crashes, and we have to reopen files, preferentially
use the newer cifs posix open protocol operation if the server supports it.
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/dir.c')
-rw-r--r-- | fs/cifs/dir.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index 89fb728..f9b6f68 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c @@ -129,7 +129,7 @@ cifs_bp_rename_retry: return full_path; } -static int cifs_posix_open(char *full_path, struct inode **pinode, +int cifs_posix_open(char *full_path, struct inode **pinode, struct super_block *sb, int mode, int oflags, int *poplock, __u16 *pnetfid, int xid) { @@ -187,7 +187,9 @@ static int cifs_posix_open(char *full_path, struct inode **pinode, if (!pinode) goto posix_open_ret; /* caller does not need info */ - *pinode = cifs_new_inode(sb, &presp_data->UniqueId); + if (*pinode == NULL) + *pinode = cifs_new_inode(sb, &presp_data->UniqueId); + /* else an inode was passed in. Update its info, don't create one */ /* We do not need to close the file if new_inode fails since the caller will retry qpathinfo as long as inode is null */ |