diff options
| author | Harshavardhana Ranganath <harsha@gluster.com> | 2009-10-29 00:50:03 +0000 | 
|---|---|---|
| committer | Anand V. Avati <avati@dev.gluster.com> | 2009-10-29 12:02:42 -0700 | 
| commit | d3a1b1e45d83d66eeb4fbd630dfe716b263b437c (patch) | |
| tree | c9a50dee9af4c939aa12c86516cfa09253a876ba | |
| parent | 70cc55ba0a28192c4e0d5d669e119f5dee9a01f0 (diff) | |
change open flag to O_RDWR as ftruncate fails for a read only fd
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 112 (parallel deletion of files mounted by different clients on the same back-end hangs and/or does not completely delete)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=112
| -rw-r--r-- | xlators/storage/posix/src/posix.c | 2 | 
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index aafa1d4c7ee..d52f90dc0a8 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -1021,7 +1021,7 @@ posix_unlink (call_frame_t *frame, xlator_t *this,          priv = this->private;          if (priv->background_unlink) {                  if (S_ISREG (loc->inode->st_mode)) { -                        fd = open (real_path, O_RDONLY); +                        fd = open (real_path, O_RDWR);                          if (fd == -1) {                                  op_ret = -1;                                  op_errno = errno;  | 
